From 62adfcd24d2b5b92fdb6627a7b5b0471b300f923 Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Wed, 24 Jan 2018 18:32:05 +0300 Subject: Make try_rmfile() to delete read-only files on Windows --- libbutl/filesystem.mxx | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'libbutl/filesystem.mxx') 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); -- cgit v1.1