Return immediatly from fs::remove_all on failure to remove entries

This way error code will be reflected properly
This commit is contained in:
Eladash 2019-08-11 13:05:11 +03:00 committed by Ivan
parent 0a5b6ad928
commit d48d424b19
2 changed files with 13 additions and 5 deletions

View file

@ -503,7 +503,7 @@ namespace fs
const std::string& get_cache_dir();
// Delete directory and all its contents recursively
void remove_all(const std::string& path, bool remove_root = true);
bool remove_all(const std::string& path, bool remove_root = true);
// Get size of all files recursively
u64 get_dir_size(const std::string& path);