Incorrect handling of changed case of sketch file name #482
Labels
topic: code
Related to content of the project itself
type: imperfection
Perceived defect in any part of project
Describe the problem
Arduino IDE incorrectly displays redundant editor tabs after the user renames a secondary sketch file under the following conditions:
mv
)🐛 The user will be confused by the presence of an editor tab for a file that no longer exists. They will not find any way to correct the situation via the Arduino IDE interface.
🐛 The bug can cause a loss of the user's sketch code.
To reproduce
Foo.ino
Foo.ino
in the sketch folder tofoo.ino
.🐛 The editor still contains a "Foo.ino" tab in addition to the expected "foo.ino" tab.
// hello world
😕 The editor does not contain the text that was added to the "foo.ino" editor tab.
🐛 An unexpected "The file 'Foo.ino' has been changed on the file system." dialog opens:
🐛 The previous
// hello world
contents of the file have been replaced by the characters that were added to the "Foo.ino" editor tab.☑
Auto save"// foobar
🐛 An unexpected "The file 'Foo.ino' has been changed on the file system." dialog opens.
🐛 An unexpected "The file 'foo.ino' has been changed on the file system." dialog opens.
😕 The editor does not contain the text that was added to the "Foo.ino" editor tab.
Expected behavior
Editor tabs always reflect the actual sketch files.
Arduino IDE version
Original report
2.0.0-beta.10
Last verified with
69b7365
Operating system
Operating system version
Additional context
The bug does not apply to renaming using the editor tab control menu's "Rename" item because its dialog refuses to allow such a renaming (#2272).
Additional Reports
Workaround
Issue checklist
The text was updated successfully, but these errors were encountered: