Closed
Description
Describe the problem
The Arduino IDE's "Sketchbook" view allows the user to browse and open sketches in their sketchbook folder.
Users may find it useful to organize their sketches into subfolders of the sketchbook folder.
🐛 Sketches with a tree deeper than two levels are not displayed correctly and cannot be opened via the "Sketchbook" view.
To reproduce
- Select File > Save As... from the Arduino IDE menus.
- Save the sketch under a subfolder of your sketchbook folder:
Arduino/ └── SomeSubfolder/ └── SomeSketch/ └── SomeSketch.ino
- Select File > New from the Arduino IDE menus.
- Close the IDE window for the "SomeSketch" sketch.
ⓘ This is done for the demonstration that the sketch can't be opened via the "Sketchbook" view. - Select File > Preferences... from the Arduino IDE menus.
- Check the box next to "☐ Show files inside Sketches.
ⓘ The issue also occurs with this setting disabled, except one additional tree level is possible due to the sketch file not counting toward the limit. - Click the OK button.
- Open the "Sketchbook" view.
- Use the ❯ control to expand the "SomeSubfolder" folder.
🐛 The expansion results in SomeSubfolder/SomeSketch:
rather than the expected tree:
- Double click on "SomeSketch"
🐛 The sketch does not open.
Expected behavior
"Sketchbook" view supports any reasonable level of folder depth.
Arduino IDE version
2.0.0-rc6-snapshot-5fc30bd
Operating system
Windows, Ubuntu
Operating system version
Windows 10, Ubuntu 20.04
Additional context
I bisected the introduction of this issue to 1ae60ec (it does not occur when using the build for b8c718c).
The issue also affects the "Remote Sketchbook" view in the same way.
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