`close_project` corrupts project workspace
Opened this issue · 0 comments
Ben-Fields commented
Description of the bug
In trying to workaround #5701, I discovered that Sublime may remove the value of the "project":
key in a project's *.sublime-workspace
file. As a result, from the user's perspective, opening the project will not display the associated project folders in the side bar. Additionally, "Project>Edit Project" is greyed out, because there is no longer an association to the project file.
Steps to reproduce
- Open Sublime Text. Ensure the setting
"hot_exit"
is enabled. - Open a project,
MyProject
. - Close Sublime Text.
- Open Sublime Text with
subl --command close_project
- Observe that the project's open folders disappear, but the open files of the project workspace remain.
- Re-opening the project by any method does not return its open folders.
Expected behavior
The project is closed, but may be re-opened later without issue.
Actual behavior
The project cannot be opened.
Sublime Text build number
4169
Operating system & version
Windows 10
(Linux) Desktop environment and/or window manager
No response
Additional information
To work around, either delete MyProject.sublime-workspace
for a fresh workspace or:
- With
"hot_exit"
enabled, the saved state from"hot_exit"
will overwrite the*.sublime-workspace
file of any open project, so make sure you close the project before modifying its*.sublime-workspace
file. - Using a different editor, open
MyProject.sublime-workspace
and manually replace"project": ""
with"project": "MyProject.sublime-project"
.
OpenGL context information
No response