Sublime Forum

No auto-reload for sym-linked Packages/Preferences

#1

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.

0 Likes

#2

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.

[quote]https://developer.apple.com/library/mac/#documentation/Darwin/Conceptual/FSEvents_ProgGuide/UsingtheFSEventsFramework/UsingtheFSEventsFramework.html#//apple_ref/doc/uid/TP40005289-CH4-SW1

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.[/quote]

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 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. )

EDIT 2: Ack! I just noticed this was fixed in a recent nightly build: MXS (Max Script) Suport

It works great now!

0 Likes