Skip to content
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

Changing case of secondary sketch filename results in duplicate editor tabs #1276

Closed
3 tasks done
per1234 opened this issue Aug 2, 2022 · 1 comment
Closed
3 tasks done
Assignees
Labels
conclusion: duplicate Has already been submitted topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project

Comments

@per1234
Copy link
Contributor

per1234 commented Aug 2, 2022

Describe the problem

In addition to the required primary .ino file, sketches may contain additional code files, which are represented as editor tabs in the Arduino IDE user interface.

🐛 The IDE may show tabs for non-existent files, and handle these tabs in unexpected ways, under the following conditions:

  • The file system is case insensitive
  • A secondary sketch file was renamed after the sketch was opened in the IDE, with the new name only differing from the old in case

To reproduce

  1. Select File > New from the Arduino IDE menus.
  2. Click the button on the right side of the editor toolbar.
  3. Select "New Tab" from the menu.
  4. In the "Name for new file" field, type foo
  5. Click the OK button.
  6. Select File > Save As... from the Arduino IDE menus.
  7. Save the sketch to any convenient location.
  8. Select File > Close from the Arduino IDE menus.
  9. Rename the file foo.ino from the saved sketch folder to Foo.ino
  10. Open the sketch again in the Arduino IDE.
    🐛 In addition to the expected Foo.ino tab, the sketch contains an unexpected foo.ino tab.
    image
  11. Select the foo.ino tab.
    😕 The tab does not contain the text added to the Foo.ino tab.
    This is a minor curiosity, but might give the user the further impression that actions taken on one tab don't affect the other.
  12. Click the button on the right side of the editor toolbar.
  13. Select "Delete" from the menu.
  14. Click the OK button.
    🐛 The Foo.ino tab is removed, the foo.ino tab remains in the editor (even though the user attempted to delete the foo.ino tab).

Expected behavior

Tabs always reflect the files present in the sketch.

Arduino IDE version

2.0.0-rc9.1

Operating system

Windows

Operating system version

10

Additional context

I was not able to reproduce the issue on Linux (surely due to its case sensitive file system). I did not test on macOS (which uses a case insensitive file system by default, like Windows).


Originally reported by @xinkiknix at https://forum.arduino.cc/t/file-delete-not-case-sensitive/1018207

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
@per1234 per1234 added topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project labels Aug 2, 2022
@per1234 per1234 changed the title Changing case of secondary sketch file results in duplicate editor tabs Changing case of secondary sketch filename results in duplicate editor tabs Aug 2, 2022
@per1234 per1234 self-assigned this Jul 21, 2023
@per1234
Copy link
Contributor Author

per1234 commented Jul 21, 2023

Closing as duplicate of #482

@per1234 per1234 closed this as completed Jul 21, 2023
@per1234 per1234 added the conclusion: duplicate Has already been submitted label Jul 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
conclusion: duplicate Has already been submitted 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

1 participant