mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-12-16 04:09:39 +00:00
Merge pull request #13995 from Dentomologist/deletedirrecursively_dont_report_error_if_directory_is_absent
DeleteDirRecursively: Don't report error for absent directory
This commit is contained in:
commit
03ef9b4995
@ -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;
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user