From d7213ffb501fbab41078d33cd41de9b0de8f6fc9 Mon Sep 17 00:00:00 2001 From: JackLivio Date: Thu, 30 Aug 2018 14:33:37 -0400 Subject: Add IsAccessible check --- src/components/utils/src/file_system.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/utils/src/file_system.cc b/src/components/utils/src/file_system.cc index a1e14ec9c5..cb09a3b0b9 100644 --- a/src/components/utils/src/file_system.cc +++ b/src/components/utils/src/file_system.cc @@ -243,7 +243,7 @@ void file_system::remove_directory_content(const std::string& directory_name) { bool file_system::RemoveDirectory(const std::string& directory_name, bool is_recursively) { // Make sure the directory exists - if (!DirectoryExists(directory_name)) { + if (!DirectoryExists(directory_name) && IsAccessible(directory_name, W_OK)) { return false; } error_code ec; -- cgit v1.2.1