I am not sure it is a bug, but it is some unconvinient usecase, that gave me so much troubles, i even bothered to register and post it here )
Probably you can give me an advice how to avoid it.
Workflow:
- mount some directory (via sshfs, flash drive - whatever)
- add the directory to a project
- open some document there with ST2 “sample.txt” and edit it
- close ST2 without closing the tab with file
- unmount the directory
… - open ST2
- you get opened project and opened tab with empty file “sample.txt”. No warning here
- mount the directory
- now if you save empty file or Alt+Tab with “save_on_focus_lost” option - ST2 will write empty file to the destination, wiping original file - old content is lost. No warning here
if the directory was not added to project - ST2 sometimes warn you, that file contens on disk has changed, but not always.
imho, combination of “save_on_focus_lost” with nonpermanent folders does cause some unpredicatable behiviour and some sort of warning would be helpfull here.