Home Download Buy Blog Forum Support

No auto-reload for sym-linked Packages/Preferences

No auto-reload for sym-linked Packages/Preferences

Postby jswartwood on Mon Mar 19, 2012 7:06 pm

If Packages/Preferences are sym-linked they don't auto-reload like they normally would. The file watching mechanism should follow sym-links to the real files.

Use case:
I currently have a setup (on OSX) where I have my Preferences files sym-linked to a folder on Dropbox so I can sync settings across computers. They do, however, pick up on a restart of Sublime Text 2, but that is an annoying loss of functionality.
Posts: 1
Joined: Mon Mar 19, 2012 6:53 pm

Re: No auto-reload for sym-linked Packages/Preferences

Postby mehaase on Sun Apr 29, 2012 3:20 pm

I've noticed the same behavior, and I believe this is due to the FS Events API (that I assume Sublime Text is using on OS X to see when files change). From FS Events' point of view, the symlink is just a normal file and does not change even when you change files in the directory pointed to by the symlink.


Generally speaking, when working with file system event notifications, you will probably want to use lstat, because changes to the underlying file will not result in a change notification for the directory containing the symbolic link to that file.

Ideally, it would be great if ST would let you move your packages, etc. to a different location, but in the meantime I am going to try the [risky] proposition of directory hard links.

EDIT: I tried hardlinks (using https://github.com/selkhateeb/hardlink) and ST *still* doesn't pick up changes to files in my Dropbox. This works on my Windows box using a "Directory Junction" or whatever it's called. <Frustrating>)

EDIT 2: Ack! I just noticed this was fixed in a recent nightly build: viewtopic.php?f=2&t=6878&hilit=2194

It works great now!
Posts: 2
Joined: Wed Dec 14, 2011 9:11 pm

Return to Technical Support

Who is online

Users browsing this forum: Yahoo [Bot] and 18 guests