summaryrefslogtreecommitdiff
path: root/Source/Core/Common/FileUtil.cpp
diff options
context:
space:
mode:
authorJosJuice <josjuice@gmail.com>2025-10-06 20:04:32 +0200
committerGitHub <noreply@github.com>2025-10-06 20:04:32 +0200
commit03ef9b4995aac89eec97541782fb2ab2269bc255 (patch)
tree5536811211aa140edd7d8fcfecc78b71c0244c41 /Source/Core/Common/FileUtil.cpp
parentb3b40200957c40942d5740be223231da0426a5d6 (diff)
parentf64e57442c813fc76bc775b4dc9ac41e18add80f (diff)
Merge pull request #13995 from Dentomologist/deletedirrecursively_dont_report_error_if_directory_is_absent
DeleteDirRecursively: Don't report error for absent directory
Diffstat (limited to 'Source/Core/Common/FileUtil.cpp')
-rw-r--r--Source/Core/Common/FileUtil.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/Source/Core/Common/FileUtil.cpp b/Source/Core/Common/FileUtil.cpp
index 21b8a1bf3c..4521be00be 100644
--- a/Source/Core/Common/FileUtil.cpp
+++ b/Source/Core/Common/FileUtil.cpp
@@ -528,9 +528,9 @@ bool DeleteDirRecursively(const std::string& directory)
std::error_code error;
const std::uintmax_t num_removed = std::filesystem::remove_all(StringToPath(directory), error);
- const bool success = num_removed != 0 && !error;
+ const bool success = num_removed != static_cast<std::uintmax_t>(-1) && !error;
if (!success)
- ERROR_LOG_FMT(COMMON, "{}: {} failed {}", __func__, directory, error.message());
+ ERROR_LOG_FMT(COMMON, "{}: {} failed. {}", __func__, directory, error.message());
return success;
}