aboutsummaryrefslogtreecommitdiff
path: root/libbutl/filesystem.mxx
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2018-01-24 18:32:05 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2018-02-08 20:49:08 +0300
commit62adfcd24d2b5b92fdb6627a7b5b0471b300f923 (patch)
treef390c1c218fd822e501a4e91b956e9e2d2289e3c /libbutl/filesystem.mxx
parentb6ebda4aad5b007d5cd6942e6c5a2795a881020c (diff)
Make try_rmfile() to delete read-only files on Windows
Diffstat (limited to 'libbutl/filesystem.mxx')
-rw-r--r--libbutl/filesystem.mxx4
1 files changed, 4 insertions, 0 deletions
diff --git a/libbutl/filesystem.mxx b/libbutl/filesystem.mxx
index 8ffbce9..a87e57b 100644
--- a/libbutl/filesystem.mxx
+++ b/libbutl/filesystem.mxx
@@ -196,6 +196,10 @@ LIBBUTL_MODEXPORT namespace butl
//
enum class rmfile_status {success, not_exist};
+ // Note that on Windows the read-only attribute is reset prior to the file
+ // removal (as it can't otherwise be deleted). In such a case the operation
+ // is not atomic.
+ //
LIBBUTL_SYMEXPORT rmfile_status
try_rmfile (const path&, bool ignore_error = false);