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

Use 'r+' with truncation when saving existing files on Windows #42899

Merged
merged 3 commits into from Aug 20, 2018

Conversation

@seishun
Copy link
Contributor

commented Feb 3, 2018

Opening a file with 'w' flag removes its alternate data streams. To
prevent this, extend the logic used for hidden files to all existing
files.

Fixes: #6363

Use 'r+' with truncation when saving existing files on Windows
Opening a file with 'w' flag removes its alternate data streams. To
prevent this, extend the logic used for hidden files to all existing
files.

Fixes: #6363

@bpasero bpasero added this to the Backlog milestone Feb 4, 2018

@bpasero bpasero self-assigned this Feb 4, 2018

@WSLUser

This comment has been minimized.

Copy link

commented May 8, 2018

@bpasero Can this be reviewed so we can resolve #49021?

@andrewmackrodt

This comment has been minimized.

Copy link

commented May 14, 2018

I think this would be better as a configuration item (default off) for all platforms. It's becoming quite common for editors to support the ability to disable safe writes (i.e. enable save in place); I'd imagine this would therefore be of benefit to Mac OS and Linux files using ACLs?

@drujd

This comment has been minimized.

Copy link

commented Jun 27, 2018

This also fixes #49021

@drujd

This comment has been minimized.

Copy link

commented Aug 19, 2018

@bpasero Is there a chance this gets merged? This would be a blessing for all WSL users.

@bpasero bpasero modified the milestones: Backlog, August 2018 Aug 20, 2018

@bpasero

This comment has been minimized.

Copy link
Member

commented Aug 20, 2018

Thanks for the PR, I think we should try to go with it as it seems like the only solution. I fear a little bit the consequences this could have compared to how we save today, but our insiders hopefully reveal if there are any. If there are issues we might have to put this behind a setting.

@bpasero bpasero merged commit aaa778b into microsoft:master Aug 20, 2018

1 of 2 checks passed

VSTS: VS Code 20180820.48 failed
Details
license/cla All CLA requirements met.
Details

@seishun seishun deleted the seishun:always-r+ branch Aug 20, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants
You can’t perform that action at this time.