Sublime Forum

Unsaved file buffers wiped when project / workspace file moved

#1

Hi,

I am using Sublime Text 3 (latest build) on Windows 10. I typically keep my workspace & project files on my desktop. Yesterday I accidentally moved these into a new folder with a few other files, with the intention to sort them later. My computer unexpectedly restarted &, when I opened Sublime again, it opened up blank - despite having had 2 windows with many unsaved files. I have checked the session file & there is only 1 buffer, which must’ve been written when I closed Sublime & tried again with the files back in the original location.

So it seems that Sublime bugs out when the workspace or project files aren’t in the correct place - instead of restoring the buffers as it should, it simply wipes all of the windows despite having the information it needs for these. I will file a bug report later but my main priority is getting the original buffers back.

Is there any way, built into Sublime or outside of Sublime, to do this - for example a folder containing backups of the session file each time Sublime is closed? I don’t appear to have a backup session file in the same folder, and Windows Restore / Windows file history isn’t an option either.

Many thanks,
Kind regards,
Clarkey

0 Likes

#2

Projects generally store their unsaved buffers in the project’s workspace file (x.sublime-workspace). What version of ST are you using?

0 Likes

#3

It’s build 3211. The sublime-project file just contains a list of folders whereas the sublime-workspace file contains an array of buffers with just 1 buffer. I must’ve had 50 buffers at least. Looking at the modified date, however, the project file was last modified on 2022-09-11 whereas the workspace file was last modified on 2022-07-24. I know my laptop has restarted for updates many times since then, so not sure why the modified date is so far back if it is automatically updated whenever Sublime closes.

Kind regards,
Clarkey

0 Likes

#4

I know my laptop has restarted for updates many times since then, so not sure why the modified date is so far back if it is automatically updated whenever Sublime closes.

That’s likely because ST3 doesn’t do clean exists when the OS is restarted, instead it’s killed. This has been fixed in ST4.

You may be able to recover data from auto-save sessions or the backup sessions.

0 Likes