Skip to content

Conversation

@gjsjohnmurray
Copy link
Contributor

This PR fixes #221014.

A "reserve-before-edit" type of SCM tool can result in a FileSystemProvider stat result with both an earlier mtime and a changed (set) FilePermission.readonly bit in permissions. VS Code was ignoring this, leaving the reverted document editable.

Copy link
Member

@bpasero bpasero left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I like this. Two feedback:

  • I think we can also apply the locked property alongside readonly which is for when a file system marked a file as not writeable
  • could we have 2 tests to test this if possible per text file model and stored file working copy?
@bpasero bpasero added this to the On Deck milestone Jul 9, 2024
@gjsjohnmurray
Copy link
Contributor Author

I have added handling for locked and written tests.

@gjsjohnmurray gjsjohnmurray requested a review from bpasero July 15, 2024 12:34
@gjsjohnmurray
Copy link
Contributor Author

Any chance of merging this for July?

@gjsjohnmurray
Copy link
Contributor Author

@bpasero can this be milestoned for August?

@bpasero bpasero modified the milestones: On Deck, August 2024 Jul 27, 2024
Copy link
Member

@bpasero bpasero left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@bpasero bpasero closed this Jul 29, 2024
@bpasero bpasero reopened this Jul 29, 2024
@bpasero bpasero merged commit 0c5af5d into microsoft:main Jul 29, 2024
@gjsjohnmurray gjsjohnmurray deleted the orange-possum branch July 29, 2024 09:08
@vs-code-engineering vs-code-engineering bot locked and limited conversation to collaborators Sep 12, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

4 participants