Sublime Forum

Problems with Sublime over sshfs


I am using sublime on Mac over a remote drive mounted using sshfs. While I am satisfied with the performance, Sublime frequently serves stale content (not the same as the disk). Even doing “File->Revert File” doesn’t seem to help. The only thing that helps is to restart sublime.

Some other oddities I am seeing:

  • Sublime will often crop some text from the end of a file I am working on.
  • Sublime will often append a series of 0x00 characters at the end of my file.

It’s annoying because I’ll often save the file and commit the code without realizing that I was working on stale content. Any pointers to what can be done?



Revert File and similar simply read the contents of the file from the filesystem. I’ve tested sshfs on linux before and haven’t encountered any of these issues. My best guess is it’s a problem with sshfs. Can you confirm that this doesn’t happen with any other programs?



But that won’t explain why restarting sublime refreshes the file contents correctly. I am currently experimenting with the “atomic_save” option to see if it helps. I’ll wait for it to repro and report back again.



FWIW, I haven’t seen this problem re-occur since I switched to using atomic_save. Potentially what might be happening is that since the access to disk is slow for a remote mount, sublime’s write operations might be getting interrupted somehow, causing it to write corrupted/incomplete data.