FilePath operations which are atomic on POSIX should be atomic on Windows
|Reported by:||glyph||Owned by:|
|Cc:||teratorn, spiv, exarkun||Branch:|
os.rename doesn't overwrite on Windows, and so in FilePath.setContent we do a crummy platform check and delete the file in advance of moving the new one over it.
However, ReplaceFile and MoveFileEx with the MOVEFILE_REPLACE_EXISTING flag do overwrite, and we could use one of those in the implementation of moveTo instead.
Change History (9)
comment:8 in reply to: ↑ 7 Changed 7 years ago by glyph
- Resolution set to duplicate
- Status changed from new to closed