Naming collision during "Save As" causes overwrite of secondary sketch file #827
Closed
3 tasks done
Labels
conclusion: resolved
Issue was resolved
topic: code
Related to content of the project itself
type: imperfection
Perceived defect in any part of project
Describe the problem
The name of the primary source file of a sketch must match the sketch folder. For this reason, the IDE's "Save As..." function does two things:
FooSketch
).FooSketch.ino
).This introduces the possibility of a collision between the target primary source file name and existing secondary source files of the sketch.
🙂 When such a collision occurs while using Arduino IDE 1.x, the operation is halted and the problem clearly communicated to the user:
🐛 When such a collision occurs while using Arduino IDE 2.x, the secondary source file is silently overwritten.
To reproduce
// Foo.ino tab content
Foo
🐛 The sketch now contains only a single file
Foo.ino
, with the contents from the primary source file. The previous contents of theFoo.ino
secondary source file have been lost.Expected behavior
-OR-
Arduino IDE version
Original report
2.0.0-rc3-snapshot.69ac1f4
Last verified with
9a6a457
Operating system
Windows
Operating system version
11
Issue checklist
The text was updated successfully, but these errors were encountered: