Skip to content

Non-alphanumeric characters in sketch name replaced in "Save As..." dialog #2097

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
3 tasks done
JanBluePix opened this issue Jun 12, 2023 · 1 comment
Open
3 tasks done
Labels
topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project

Comments

@JanBluePix
Copy link

JanBluePix commented Jun 12, 2023

Describe the problem

The names of Arduino sketches may contain . and - characters in addition to basic alphanumeric characters.

🐛 . and - characters in the current sketch name are unnecessarily replaced with _ in the default sketch name that is prepopulated in the save as dialog.

To reproduce

  1. Select File > New Sketch from the Arduino IDE menus.
  2. Select File > Save As... from the Arduino IDE menus.
  3. Save the sketch to any location outside the sketchbook folder with the name foo.bar-baz
  4. Select File > Save As... from the Arduino IDE menus.

🐛 The sketch name prepopulated in the save as dialog is foo_bar_baz instead of the original foo.bar-baz

Expected behavior

The base sketch name is used verbatim in the prepopulated sketch name in the save as dialog.

Arduino IDE version

arduino-ide_nightly-20230612_Linux_64bit.AppImage

Operating system

  • Linux
  • Windows

Operating system version

  • Linux Kernel Version: 6.1.31-1-MANJARO (64-bit)
  • Windows 11

Additional context

A location outside the sketchbook folder was used in step (3) of the demo to avoid the introduction of the irrelevant complexity of the anti-collision suffix (e.g., _copy_20230612092238), but the fault of the unnecessary character replacements occurs even if the sketch is saved in the sketchbook at that step.

Additional reports

Issue checklist

  • I searched for previous reports in the issue tracker
  • I verified the problem still occurs when using the latest nightly build
  • My report contains all necessary details
@JanBluePix JanBluePix added the type: imperfection Perceived defect in any part of project label Jun 12, 2023
@per1234 per1234 changed the title Save as with pointless file replacement Non-alphanumeric characters in base sketch name replaced unnecessarily by anti-collision code in "Save As..." dialog Jun 12, 2023
@per1234 per1234 changed the title Non-alphanumeric characters in base sketch name replaced unnecessarily by anti-collision code in "Save As..." dialog Non-alphanumeric characters in sketch name replaced in "Save As..." dialog Jun 12, 2023
@per1234 per1234 added the topic: code Related to content of the project itself label Jun 12, 2023
@JanBluePix

This comment has been minimized.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project
Projects
None yet
Development

No branches or pull requests

2 participants