Sublime Forum

Session.sublime_session lost on upgrade to 3126

#1

Hi,

On Windows, I’ve so far only been using ST3 as a better Notepad.exe. I often use it as a scratch pad and enjoy it automatically saving/restoring the content across restarts without me having to explicitly save each tab to a file.

I just upgraded to 3126 and it has deleted the “%APPDATA%\Sublime Text 3\Local\Session.sublime_session” file, thereby not only losing the list of tabs, but also losing their content entirely. I don’t keep anything truly important in there, but I have lost some context as a result.

Is this expected upgrade behavior? Does anyone know if there is an existing bug tracking this?

Thanks,

Steven

0 Likes

#2

May you explain this better? The session file only contains the list of files, not their contents. Just reopen them again. You do not backuped before upgrading to the newer version?

0 Likes

#3

No, it sounds like some sort of error occurred.

The session also stores unsaved files, and previous values for find panels, project switcher, etc.

1 Like

#4

[quote=“addons_zz, post:2, topic:23548, full:true”]
May you explain this better? The session file only contains the list of files, not their contents. Just reopen them again.[/quote]
For unsaved tabs the content is stored in the session file. Here’s a cutdown example of the relevant part of a session file for two unsaved tabs:

"windows": [{
    "buffers": [{
            "contents": "first tab, line 1\nfirst tab, line 2\nfirst tab, line 3\n",
            "settings": {
                "buffer_size": 54,
                "line_ending": "Windows",
                "name": "first tab, line 1"
            }
        },{
            "contents": "second tab, line 1\nsecond tab, line 2\nsecond tab, line 3\n",
            "settings": {
                "buffer_size": 57,
                "line_ending": "Windows",
                "name": "second tab, line 1"
            }
        }
    ],
}],

I can’t. The content was lost when the session file was replaced.

No. The data was not critical enough for me to bother saving the tabs to individual files. However, it is some minor pain that would have been avoided if the session file was not lost on upgrade. I am not complaining here, just discussing a potential bug.

3 Likes

#5

Thanks, Will. I’ve create a bug: https://github.com/SublimeTextIssues/Core/issues/1438

0 Likes