diff options
| author | gibbed <rick@gibbed.us> | 2020-11-24 02:01:43 -0600 |
|---|---|---|
| committer | Rick Gibbed <rick@gibbed.us> | 2020-11-24 02:02:49 -0600 |
| commit | cabd28b9bb80c32034424b70450be28c55dec4fe (patch) | |
| tree | f8753b87255564f1f4c0adfaecd4c995e2b1ff99 | |
| parent | bda31a443e295106bf69fdaf49ecd63126677028 (diff) | |
[VFS] Fix handling of remove_all return value.
| -rw-r--r-- | src/xenia/vfs/devices/host_path_entry.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/xenia/vfs/devices/host_path_entry.cc b/src/xenia/vfs/devices/host_path_entry.cc index dba726c2a..8d1025d4d 100644 --- a/src/xenia/vfs/devices/host_path_entry.cc +++ b/src/xenia/vfs/devices/host_path_entry.cc @@ -100,7 +100,8 @@ bool HostPathEntry::DeleteEntryInternal(Entry* entry) { std::error_code ec; // avoid exception on remove/remove_all failure if (entry->attributes() & kFileAttributeDirectory) { // Delete entire directory and contents. - return std::filesystem::remove_all(full_path, ec); + auto removed = std::filesystem::remove_all(full_path, ec); + return removed >= 1 && removed != static_cast<std::uintmax_t>(-1); } else { // Delete file. return !std::filesystem::is_directory(full_path) && |
