> Uh, apparently I'm an elephant.

Well, Enricos never forget, as just proved :grin:.

Clearly I wasn't clear enough so to be clear (pun intended) after unravelling 
the spaghetti (code) the process for setting the base path of the file dialog 
is the same on all platforms (first found "wins"):

1. the directory of the current document unless no document or current  does 
not have a filename, ie `untitled` 
2. if a project is open then the project base path if it is valid
3. if `Edit->Preferences->General->Startup->Startup Path` is set then that 
value (which I didn't know until tracing the code)
4. if none of the above, the gtk file chooser is left to its own devices, and 
seems to choose the current working directory

The OP said "Anyway, C:\Program Files\Geany is not a location to save your 
files." and I concur, but what I was saying was that occurs because of point 4 
_and_ the fact that on Windows the working directory is changed to the install 
dir due to silly windows locking process current dirs.  Although the OP has "no 
reasons for me to start Geany from the command line" clearly others do, or the 
locking problem would not have been noticed and the SF bug would not have been 
raised.  The solution of changing the WD to some other directory that the user 
won't want to remove is good, and the Geany install directory is all Geany can 
be sure exists, so using that is reasonable.  But it has the side effect of 
becoming the default location of the open dialog.

On Linux the working dir is not changed and using that makes sense if Geany is 
started from the command line, but if started from the menu/shortcut it will be 
whatever the window management system chooses as the working dir, and as noted 
above at least on some systems that is HOME.

So yes everything is intended, but it has the side effect of having the 
open/save dialog open in an unhelpful directory by default on windows.

Anyway having discovered the setting at point 3 exists, @iahung3 that looks 
like a solution for you, set it somewhere that you find useful, note it is an 
absolute path.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/discussions/3664#discussioncomment-7429683
You are receiving this because you are subscribed to this thread.

Message ID: <geany/geany/repo-discussions/3664/comments/[email protected]>

Reply via email to