Wipe clean VSH's temporary directory of choice at boot
This commit is contained in:
+2
-2
@@ -1788,7 +1788,7 @@ const std::string& fs::get_temp_dir()
|
||||
return s_dir;
|
||||
}
|
||||
|
||||
bool fs::remove_all(const std::string& path, bool remove_root)
|
||||
bool fs::remove_all(const std::string& path, bool remove_root, bool is_no_dir_ok)
|
||||
{
|
||||
if (const auto root_dir = dir(path))
|
||||
{
|
||||
@@ -1817,7 +1817,7 @@ bool fs::remove_all(const std::string& path, bool remove_root)
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
return is_no_dir_ok;
|
||||
}
|
||||
|
||||
if (remove_root)
|
||||
|
||||
+1
-1
@@ -648,7 +648,7 @@ namespace fs
|
||||
};
|
||||
|
||||
// Delete directory and all its contents recursively
|
||||
bool remove_all(const std::string& path, bool remove_root = true);
|
||||
bool remove_all(const std::string& path, bool remove_root = true, bool is_no_dir_ok = false);
|
||||
|
||||
// Get size of all files recursively
|
||||
u64 get_dir_size(const std::string& path, u64 rounding_alignment = 1);
|
||||
|
||||
Reference in New Issue
Block a user