Skip to content

"Save As" dialog always defaults to sketchbook folder #2725

@aalucia

Description

@aalucia

Describe the problem

in Arduino IDE 2.3.6, the behavior of "Save As" has changed compared to previous versions. Previously, the IDE would remember the last used directory and open the "Save As" dialog in that folder. However, in 2.3.6, it defaults to the Arduino default sketch directory (usually Documents/Arduino), regardless of where you last saved or opened a sketch.

To reproduce

use "save as"

Expected behavior

should go to the last used directory, but goes to default one instead

Arduino IDE version

2.3.6

Operating system

Linux

Operating system version

Suse linux

Additional context

until 2.3.4 did work correctly, note: cannot install lates nighly build

Issue checklist

  • I searched for previous reports in
    I verified the problem still occurs when using the latest
    My report contains all necessary details

Activity

self-assigned this
on May 1, 2025
per1234

per1234 commented on May 1, 2025

@per1234
Contributor

Hi @aalucia. Thanks for your report. I just did some testing with Arduino IDE 2.3.6 on a Linux machine and was not able to reproduce the fault. For me, the behavior of which folder is selected in the "Save As" dialog by default is exactly the same in 2.3.6 as in 2.3.4.

It might be that my failure to reproduce the fault is because I am not using the correct procedure. Please provide detailed step by step instructions I can follow to reliably reproduce the fault on my computer.

aalucia

aalucia commented on May 2, 2025

@aalucia
Author
removed their assignment
on May 2, 2025
changed the title [-]save as behaivour changed[/-] [+]"Save As" dialog always defaults to sketchbook folder[/+] on May 2, 2025
per1234

per1234 commented on Jun 3, 2025

@per1234
Contributor

Thanks for the clarification. Unfortunately I am still unable to reproduce the fault.

I performed the following procedure with Arduino IDE 2.3.6 on a Ubuntu 24.04.2 machine:

  1. Select File > New Sketch from the Arduino IDE menus.
    A new Arduino IDE window opens.
  2. Select File > Save As... from the Arduino IDE menus.
  3. Save the sketch at ~/Arduino/foo/bar.
  4. Select File > Close from the Arduino IDE menus.
    The "bar" sketch window closes.
  5. Select File > Open Recent > bar from the Arduino IDE menus.
    The "bar" sketch opens in a new Arduino IDE window.
  6. Select File > Save As... from the Arduino IDE menus.

The "Save As" dialog opens with the ~/Arduino/foo folder selected:

Image

This seems to be the correct behavior, whereas if the fault had occured as you described I would have expected it to instead open with the ~/Arduino folder selected (I have my "Sketchbook folder" preference set to the ~/Arduino folder).

@aalucia if you perform the procedure I described above, do you get a different result than I did?

I did find some reports of the problem on Arduino Forum:

However, those reports are from years ago, so they don't match with your observation that this is a regression introduced in 2.3.6 (or maybe 2.3.5).

self-assigned this
on Jun 3, 2025
aalucia

aalucia commented on Jun 5, 2025

@aalucia
Author

Hi,

the behaivour is as follows:

If I save under ~/Arduino/foo/bar and I follow your direction the second time I "save as" it's in the correct directory (/foo...)

If I save under another directory (not under /Arduino) then the "save as" it always takes me to /Arduino

while with v 2.3.4 I get the following interface, where I can also save "bookmarks" :

Image

I'm quite puzzled ...

Thanks for your help.

per1234

per1234 commented on Jun 6, 2025

@per1234
Contributor

If I save under another directory (not under /Arduino) then the "save as" it always takes me to /Arduino

OK, great. This is the essential information. I can now reproduce the fault once I produce the required conditions of saving the sketch to a location outside the sketchbook folder.

However, I am not able to reproduce this part of your report:

until 2.3.4 did work correctly

The fault also occurs for me when using Arduino IDE 2.3.4.

Please perform this procedure and then report your results:

  1. If a version of Arduino IDE other than 2.3.4 is running on your computer, select File > Quit from the Arduino IDE menus to close all Arduino IDE windows.
  2. Start Arduino IDE 2.3.4.
  3. Select File > New Sketch from the Arduino IDE menus.
    A new Arduino IDE window opens.
  4. Select File > Save As... from the Arduino IDE menus.
  5. Save the sketch at ~/arduino_arduino-ide_2725-test/foo.
  6. Select File > Save As... from the Arduino IDE menus.

Now please comment here to tell us whether the Save As dialog opened in the expected location ~/arduino_arduino-ide_2725-test/, or if it instead opened in the sketchbook folder.

with v 2.3.4 I get the following interface, where I can also save "bookmarks"

That is out of scope for this issue. You are welcome to open a separate issue to report this apparent regression related to "bookmarks", but please focus all discussion here exclusively on the "defaults to the Arduino default sketch directory (usually Documents/Arduino), regardless of where you last saved or opened a sketch" fault that is the subject of this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

    Development

    No branches or pull requests

      Participants

      @per1234@aalucia

      Issue actions

        "Save As" dialog always defaults to sketchbook folder · Issue #2725 · arduino/arduino-ide