Skip to content

Commit

Permalink
Auto merge of #116438 - ChrisDenton:truncate, r=thomcc
Browse files Browse the repository at this point in the history
Windows: Allow `File::create` to work on hidden files

This makes `OpenOptions::new().write(true).create(true).truncate(true).open(&path)` work if the path exists and is a hidden file. Previously it would fail with access denied.

This makes it consistent with `OpenOptions::new().write(true).truncate(true).open(&path)` (note the lack of `create`) which does not have this restriction. It's also more consistent with other platforms.

Fixes #115745 (see that issue for more details).
  • Loading branch information
bors committed Dec 13, 2023
2 parents 079cf28 + 0e05f4a commit 5d25e73
Showing 0 changed files with 0 additions and 0 deletions.

0 comments on commit 5d25e73

Please sign in to comment.