Sublime Forum

"Save"/"Save as" dialog always opens on home folder

#1

Hi, since recently the “Save”/“Save as” dialog got stuck on the home folder - again.

I had this problem before on my previous machine. With a fresh install on my new machine the dialog used to work properly, opening with the path of the current file (or selected folder, when context-clicking in the sidebar). Now after about a year the problem came back: Again, the dialog (almost) always opens on the home folder.

I don’t know what caused this, at one point it just started - again - and now it appears to stay like that.

This is very annoying, especially when you have to click through 10-20 levels in a deep directory structure. Or you wonder why a new file doesn’t appear in the expected location, to find out later that it was saved to the home folder.

I found only this related topic: "Save as" doesn't use the file's position on Linux, but without a solution.

How can this be solved?

0 Likes

#2

What distribution, desktop environment and file dialog are you using?

0 Likes

#3

Actually, what makes that issue related is not Linux, but the problem. I have it on a Mac running Ventura.

Meanwhile I found out that there is a property in the macOS application preferences which controls the path of the dialog. It can be accessed with:

defaults read com.sublimetext.4.plist NSNavLastRootDirectory
defaults write com.sublimetext.4.plist NSNavLastRootDirectory <...>

As long as it points to the path of the current file, the dialog opens there properly, but if the current file is in a different folder, then opening the dialog resets the property to ~ and the dialog opens there.

Bug in ST? Or is there any way a plugin could mess this up?

0 Likes

#4

Solution: Remove all macOS Finder Tags in path.

See: https://github.com/sublimehq/sublime_text/issues/6319

0 Likes