mirror of
https://github.com/cemu-project/Cemu.git
synced 2026-07-10 01:24:41 -06:00
Fix infinite recursion on non-existing directory
This commit is contained in:
parent
97b5622705
commit
14aa8aaf63
@ -7,7 +7,11 @@ fs::path findPathCI(const fs::path& path)
|
||||
fs::path fName = path.filename();
|
||||
fs::path parentPath = path.parent_path();
|
||||
if (!fs::exists(parentPath))
|
||||
return findPathCI(findPathCI(parentPath) / fName);
|
||||
{
|
||||
auto CIParent = findPathCI(parentPath);
|
||||
if (fs::exists(CIParent))
|
||||
return findPathCI(CIParent / fName);
|
||||
}
|
||||
|
||||
std::error_code listErr;
|
||||
for (auto&& dirEntry : fs::directory_iterator(parentPath, listErr))
|
||||
|
||||
Loading…
Reference in New Issue
Block a user