lilbuzz November 20, 2023, 5:31pm 1 Using IDE 2.2.1. When I use File - Save As, and use the new sketch name that is automatically provided by the IDE, it correctly saves the sketch files in the new sketch folder, and correctly sets the sketch file name (*.ino). But, it then pulls the files from the build folder and the .theia folder, and places them into the new sketch folder. It does NOT create a build subfolder, nor a .theia subfolder. All files show up in the sketch folder.
Hi @lilbuzz . The Arduino IDE developers are tracking this bug here:
opened 01:55PM - 27 May 23 UTC
topic: code type: imperfection
### Describe the problem Arduino sketches may contain files under subfolders:… - [`data`](https://arduino.github.io/arduino-cli/dev/sketch-specification/#data-subfolder) - [`src`](https://arduino.github.io/arduino-cli/dev/sketch-specification/#src-subfolder) 🐛 After a "**Save As...**" operation, any subfolders are lost and the files are all moved to the root sketch folder. ### To reproduce 1. Click the following link to download the demonstration sketch: [HasSubfolders.zip](https://github.com/arduino/arduino-ide/files/12036173/HasSubfolders.zip) 1. Unzip the downloaded file. 1. Take note of the file structure of the sketch: ```text HasSubfolders/ ├── HasSubfolders.ino └── src/ └── FromSubfolder.h ``` 1. Select **File > Open** from the Arduino IDE menus. 1. Select the `HasSubfolders.ino` file from the unzipped folder. 1. Select **File > Save As...**" from the Arduino IDE menus. 1. Save the sketch to any convenient name and location. 1. Select **Sketch > Show Sketch Folder** from the Arduino IDE menus. 🐛 The subfolder structure of the sketch was lost: ```text HasSubfoldersAfterSaveAs/ ├── FromSubfolder.h └── HasSubfoldersAfterSaveAs.ino ``` ### Expected behavior A "**Save As**" operation does not make any changes to the sketch file structure. ### Arduino IDE version 94d2962 ### Operating system - Windows - Linux - macOS ### Operating system version - Windows 11 - Ubuntu 22.04 - macOS Ventura ### Additional context I bisected the regression to 0ab2826 (the fault does not occur when using 2aad0e3). ### Issue checklist - [X] I searched for previous reports in [the issue tracker](https://github.com/arduino/arduino-ide/issues?q=) - [X] I verified the problem still occurs when using the latest [nightly build](https://www.arduino.cc/en/software#nightly-builds) - [X] My report contains all necessary details
If you have a GitHub account, you can subscribe to that issue to get notifications of any new developments related to this subject:
system Closed May 21, 2024, 7:48am 3 This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.