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

should we prompt to "save as" on close of a deleted file? #23501

Closed
chrisdias opened this issue Mar 28, 2017 · 1 comment
Closed

should we prompt to "save as" on close of a deleted file? #23501

chrisdias opened this issue Mar 28, 2017 · 1 comment
Assignees
Labels
*as-designed Described behavior is as designed
Milestone

Comments

@chrisdias
Copy link
Member

Testing: #23242

  • autosave off
  • "workbench.editor.closeOnFileDelete": false
  1. create a new file (e.g. test.md)
  2. make some changes, save to disk
  3. delete from disk (using Finder)

Result: you see the "(deleted from disk)" note in the tab. This is goodness.

If i make an edit to the file to dirty it, then click on the "x" then i get prompted to save, this is goodness.

However, if I don't make any changes the file then click on the "x" to close, I'm not prompted and all of that content in the file is gone. It feels like data loss. How bad would it be to prompt the user in this scenario? maybe the file was removed from disk accidentally...

@chrisdias chrisdias added this to the March 2017 milestone Mar 28, 2017
@bpasero
Copy link
Member

bpasero commented Mar 28, 2017

We decided against this to not confuse users that the buffer shown contains data typed by the user and then suddenly thinks he should save the file (which then puts it back to disk). We also do not want to restore such buffers as part of hot exit. I am closing this as wont fix, talk to me over beer if you want to talk more about it.

@bpasero bpasero closed this as completed Mar 28, 2017
@bpasero bpasero added the *as-designed Described behavior is as designed label Mar 28, 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
*as-designed Described behavior is as designed
Projects
None yet
Development

No branches or pull requests

2 participants