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

Do not attempt to save unchanged file in diff-view when file is read only #160286

Closed
hansu opened this issue Sep 7, 2022 · 4 comments
Closed
Labels
feature-request Request for new features or functionality file-io File I/O workbench-editors Managing of editor widgets in workbench window

Comments

@hansu
Copy link

hansu commented Sep 7, 2022

I discovered almost exactly the same issue as #121539 on a windows machine.

  1. file_a.txt is read-only and file_b.txt is writable
  2. diff these files
  3. make changes to file_b.txt
  4. save changes in diff-editor
    Result: file_b.txt is saved and file_a.txt gets marked as changed and fails to save:
    vscode-bug-save-diff
@bpasero
Copy link
Member

bpasero commented Sep 7, 2022

We always target all sides of an editor when saving and when a save fails we automatically mark the editor as dirty to have a backup of the contents.

I agree the outcome here is not 100% ideal, but I think it is a corner case I would tolerate.

Anyway, treating as feature for changing this because the current behaviour actually is as intended.

@bpasero bpasero added feature-request Request for new features or functionality file-io File I/O workbench-editors Managing of editor widgets in workbench window labels Sep 7, 2022
@bpasero bpasero removed their assignment Sep 7, 2022
@bpasero bpasero changed the title Attempt to save unchanged file in diff-view when file is read only Do not attempt to save unchanged file in diff-view when file is read only Sep 7, 2022
@vscodenpa vscodenpa added this to the Backlog Candidates milestone Sep 7, 2022
@vscodenpa
Copy link

This feature request is now a candidate for our backlog. The community has 60 days to upvote the issue. If it receives 20 upvotes we will move it to our backlog. If not, we will close it. To learn more about how we handle feature requests, please see our documentation.

Happy Coding!

@vscodenpa
Copy link

This feature request has not yet received the 20 community upvotes it takes to make to our backlog. 10 days to go. To learn more about how we handle feature requests, please see our documentation.

Happy Coding!

@vscodenpa
Copy link

🙁 In the last 60 days, this feature request has received less than 20 community upvotes and we closed it. Still a big Thank You to you for taking the time to create this issue! To learn more about how we handle feature requests, please see our documentation.

Happy Coding!

@vscodenpa vscodenpa closed this as not planned Won't fix, can't repro, duplicate, stale Nov 8, 2022
@github-actions github-actions bot locked and limited conversation to collaborators Dec 25, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature-request Request for new features or functionality file-io File I/O workbench-editors Managing of editor widgets in workbench window
Projects
None yet
Development

No branches or pull requests

3 participants