Fixup after #6329
This commit is contained in:
+8
-1
@@ -1541,7 +1541,9 @@ const std::string& fs::get_cache_dir()
|
||||
|
||||
bool fs::remove_all(const std::string& path, bool remove_root)
|
||||
{
|
||||
for (const auto& entry : dir(path))
|
||||
if (const auto root_dir = dir(path))
|
||||
{
|
||||
for (const auto& entry : root_dir)
|
||||
{
|
||||
if (entry.name == "." || entry.name == "..")
|
||||
{
|
||||
@@ -1564,6 +1566,11 @@ bool fs::remove_all(const std::string& path, bool remove_root)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if (remove_root)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user