Sublime Forum

Network Files Not Found Are Overwritten

#1

I have many projects that I switch back and forth between. Some of the files for said projects are located on network drives that need to be manually connected to upon startup. I have noticed that if a needed network is not connected when you open a project that has files already open in it, the file that you are currently viewing is cleared of contents. Once connecting the drive needed, it will ask to reload the file, I choose yes to reload and it’s still empty and it also clears the file on the network. Luckily, most of the time the files are in version control so I can easily revert back, but some cases have caused me to lose a files contents and start over.

Is this a bug? I know I can use due diligence to always make sure I am connected to the drives, however, what happens in the scenarios where you can’t always ‘prepare’ for a network to not be connected?

Thanks in advance!

0 Likes

#2

Which version of sublimetext are you using?

0 Likes

#3

Sorry for not including that in the OP.

Version 2.0.2

0 Likes

#4

This was reported a while ago:

[BUG]: Data erasure on session restore

I don’t know if it’s been addressed even in ST3.

0 Likes

#5

I’ve run into this too and generally if I close the project window, reconnect the network drives/shares and reopen the project files reappear correctly.

I’m not sure if this behaviour changes with “hot_exit” disabled though since I have it enabled.

Another way to work around this is to change your workflow slightly. Save your projects in the network location along with your files. If the network resource is unavailable, the project won’t load at all, avoiding further hassle.

0 Likes

#6

That’s a good idea qgates about saving the project files on the network as well.

I tried closing out ST2 when I noticed the network wasn’t connected, reconnect the shared drive and then reopen the project, but it still saved the file as empty. It’s really weird.

0 Likes