From 39ce51acd1a187891d9951e8ae5460f9b6f4603c Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Thu, 14 Feb 2019 22:38:51 +0300 Subject: Fix rmdir_r() that may throw system_error regardless of ignore_error flag value --- libbutl/filesystem.ixx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'libbutl/filesystem.ixx') 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); -- cgit v1.1