aboutsummaryrefslogtreecommitdiff
path: root/libbutl/filesystem.ixx
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2019-02-14 22:38:51 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2019-02-15 13:28:54 +0300
commit39ce51acd1a187891d9951e8ae5460f9b6f4603c (patch)
tree174b74371962cf94aba11bd78317073778705644 /libbutl/filesystem.ixx
parent3c3b18efe6b9fc6f51d16c9569ca1e150adeaf76 (diff)
Fix rmdir_r() that may throw system_error regardless of ignore_error flag value
Diffstat (limited to 'libbutl/filesystem.ixx')
-rw-r--r--libbutl/filesystem.ixx4
1 files changed, 3 insertions, 1 deletions
diff --git a/libbutl/filesystem.ixx b/libbutl/filesystem.ixx
index 5ac5d97..c9e3997 100644
--- a/libbutl/filesystem.ixx
+++ b/libbutl/filesystem.ixx
@@ -29,7 +29,9 @@ namespace butl
inline rmdir_status
try_rmdir_r (const dir_path& p, bool ignore_error)
{
- bool e (dir_exists (p)); //@@ What if it exists but is not a directory?
+ //@@ What if it exists but is not a directory?
+ //
+ bool e (dir_exists (p, ignore_error));
if (e)
rmdir_r (p, true, ignore_error);