Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Untitled restores even when files.hotExit is turned off in some cases #17080

Closed
bpasero opened this issue Dec 12, 2016 · 4 comments
Closed

Untitled restores even when files.hotExit is turned off in some cases #17080

bpasero opened this issue Dec 12, 2016 · 4 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug verified Verification succeeded workbench-hot-exit Preservation of unsaved changes across restarts
Milestone

Comments

@bpasero
Copy link
Member

bpasero commented Dec 12, 2016

Steps to Reproduce:

  1. configure files.hotExit: false
  2. create untitled file with some content and quit, discard the file quickly enough before our 1s backup model tracker kicks in
  3. restart

=> the untitled file restores with its backup

@bpasero bpasero added bug Issue identified by VS Code Team member as probable bug workbench-hot-exit Preservation of unsaved changes across restarts labels Dec 12, 2016
@bpasero bpasero added this to the January 2017 milestone Dec 12, 2016
@bpasero bpasero self-assigned this Dec 12, 2016
@bpasero bpasero assigned Tyriar and unassigned bpasero Dec 12, 2016
@bpasero
Copy link
Member Author

bpasero commented Dec 12, 2016

@Tyriar moving to you, it looks like on shutdown we are not properly stopping the backup editor tracker to produce backups after 1s, so if I manage to quit quickly enough after making changes to an untitled file, I see the backup directory show backups for the untitled file (and probably others too) even though I explicitly said to discard the untitled file. Upon restart it will restore from there.

@bpasero bpasero changed the title Untitled restores even when files.hotExit is turned off Untitled restores even when files.hotExit is turned off in some cases Dec 12, 2016
@Tyriar
Copy link
Member

Tyriar commented Jan 23, 2017

I don't think this is an issue anymore, there is a hot exit check in TextFileService shutdown which either shows prompt or goes ahead with the hot exit. I can only repro th bad hot exit when closing so fast after changing the setting that TextFileService.onConfigurationChange doesn't have a change to run.

@Tyriar Tyriar closed this as completed Jan 23, 2017
@Tyriar Tyriar modified the milestones: November 2016, January 2017 Jan 23, 2017
@bpasero
Copy link
Member Author

bpasero commented Jan 23, 2017

Reproduces quite easily:

panel-red

@bpasero bpasero reopened this Jan 23, 2017
@Tyriar
Copy link
Member

Tyriar commented Jan 23, 2017

Ah I misunderstood. Thanks for the gif, should be able to fix tomorrow.

@Tyriar Tyriar modified the milestones: January 2017, November 2016 Jan 23, 2017
@Tyriar Tyriar closed this as completed in 32593d8 Jan 25, 2017
@bpasero bpasero added the verified Verification succeeded label Jan 26, 2017
@vscodebot vscodebot bot locked and limited conversation to collaborators Nov 18, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug verified Verification succeeded workbench-hot-exit Preservation of unsaved changes across restarts
Projects
None yet
Development

No branches or pull requests

2 participants