You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Restore hot-exit files to the correct instance when renaming workspace folder #26533
open a folder, and then open and modify some files ;
(under the setting {"files.hotExit": "onExitAndWindowClose"} ,) close the window ;
rename the folder (, or change its location) ;
open that folder with vscode ;
the restoring fails ;
*6. if undo the rename and/or move of the folder, everything seems to be fine again ;
So, imho maybe the archive about hotExit (or some related params (likethe current path of the folder to be restored) ) should be stored in the ./.vscode ?
Ok this is not data loss but inconvenience: we do open the dirty files in a separate window as untitled files and not within the instance where the renamed folder was opened. I do not think we could actually support this in any way unless we would track file events between restarts of VS Code.
changed the title [-]Restoring (after hotExit) fails once the name (or path) of the folder was changed[/-][+]Restore hot-exit files to the correct instance when renaming workspace folder[/+]on May 14, 2017
Actually I can understand that is not data loss. If it did lose data, I would not be able to see the 6-th step among the steps-to-reproduce in my first post.
So I guess it is just a error that cannot find any saved archive when addressing to the changed new path.
If my understand is not wrong, it may be not necessary to track the file events (on VSCode's own).
What I imagine is that VSCode records and restores the status of the folder relying on the path. Instead, working with a certain identifier, which is independent of the physical path, for example a unique id established whenever the folder was opened at the first time. I think this may work ...
Also I know this may be a really little need/feature for what the name hot-exit suggests ...
Benjamin Pasero (@bpasero) we were talking about a command to open workspaces that have backups, I still believe that would be useful and could help with this.
As for tracking the change in the folder I can't think of a nice way to do it. We could mitigate the problem by providing a command like above and maybe a command that opened the actual backup folder in explorer/finder so users don't need to hunt for them manually.
I'm not sure if this is related, it seems to be semi-related; I can open a new issue if needs be.
I created a new window that did not yet have a directory opened (there was another window opened with a project/directory that I spawned the new window from). I created a new file in this new window, the file was populated but not saved, my system restarted for updates and I lost the file. So is that file saved somewhere to some odd namespace and I can restore it, or is it gone forever?
Edit: wait, I just found a spare window somewhere, so maybe when it restarted it relaunched two windows instead of one! Might be good to keep an eye on this type of case when changing this out though. I'm so glad it managed to come back :) I had opened a new window from the last project it auto opened, hoping to see the lost file there, but there was nothing. I guess it just opened two windows instead of just one which I'm used to it only launching 1.
This iteration we focus on issue grooming. This issue is being closed to keep the number of issues in our inbox on a manageable level, we are closing issues that are not going to be addressed in the foreseeable future: We look at the number of votes the issue has received and the number of duplicate issues filed. More details here. If you disagree and feel that this issue is crucial: We are happy to listen and to reconsider.
Activity
bpasero commentedon May 12, 2017
Daniel Imms (@Tyriar) we should be able to restore the files maybe as untitled files to one window so that at least the data is not lost?
slodki commentedon May 12, 2017
look at #26545
bpasero commentedon May 14, 2017
Ok this is not data loss but inconvenience: we do open the dirty files in a separate window as untitled files and not within the instance where the renamed folder was opened. I do not think we could actually support this in any way unless we would track file events between restarts of VS Code.
[-]Restoring (after hotExit) fails once the name (or path) of the folder was changed[/-][+]Restore hot-exit files to the correct instance when renaming workspace folder[/+]Binly42 commentedon May 15, 2017
Actually I can understand that is not data loss. If it did lose data, I would not be able to see the 6-th step among the steps-to-reproduce in my first post.
So I guess it is just a error that cannot find any saved archive when addressing to the changed new path.
If my understand is not wrong, it may be not necessary to track the file events (on VSCode's own).
What I imagine is that VSCode records and restores the status of the folder relying on the path. Instead, working with a certain identifier, which is independent of the physical path, for example a unique id established whenever the folder was opened at the first time. I think this may work ...
Also I know this may be a really little need/feature for what the name hot-exit suggests ...
I am sorry for my poor english ...
Tyriar commentedon May 15, 2017
Benjamin Pasero (@bpasero) we were talking about a command to open workspaces that have backups, I still believe that would be useful and could help with this.
As for tracking the change in the folder I can't think of a nice way to do it. We could mitigate the problem by providing a command like above and maybe a command that opened the actual backup folder in explorer/finder so users don't need to hunt for them manually.
ctsstc commentedon Aug 30, 2017
I'm not sure if this is related, it seems to be semi-related; I can open a new issue if needs be.
I created a new window that did not yet have a directory opened (there was another window opened with a project/directory that I spawned the new window from). I created a new file in this new window, the file was populated but not saved, my system restarted for updates and I lost the file. So is that file saved somewhere to some odd namespace and I can restore it, or is it gone forever?
Edit: wait, I just found a spare window somewhere, so maybe when it restarted it relaunched two windows instead of one! Might be good to keep an eye on this type of case when changing this out though. I'm so glad it managed to come back :) I had opened a new window from the last project it auto opened, hoping to see the lost file there, but there was nothing. I guess it just opened two windows instead of just one which I'm used to it only launching 1.
vscodebot commentedon Sep 12, 2018
This iteration we focus on issue grooming. This issue is being closed to keep the number of issues in our inbox on a manageable level, we are closing issues that are not going to be addressed in the foreseeable future: We look at the number of votes the issue has received and the number of duplicate issues filed. More details here. If you disagree and feel that this issue is crucial: We are happy to listen and to reconsider.
If you wonder what we are up to, please see our roadmap and issue reporting guidelines.
Thanks for your understanding and happy coding!