mirror of
https://github.com/cemu-project/Cemu.git
synced 2026-07-10 01:24:41 -06:00
Last PR introduced a bug
This commit is contained in:
parent
7b4dc86252
commit
ac7b7add27
@ -13,19 +13,20 @@ std::optional<fs::path> findPathCI(const fs::path& path)
|
||||
else
|
||||
return {};
|
||||
}
|
||||
|
||||
std::string fName = path.filename().string();
|
||||
if (fs::exists(parentPath))
|
||||
|
||||
if (fs::exists(parentPath / fName))
|
||||
return parentPath / fName;
|
||||
|
||||
std::error_code listErr;
|
||||
for (auto&& dirEntry: fs::directory_iterator(parentPath, listErr))
|
||||
{
|
||||
std::error_code listErr;
|
||||
for (auto&& dirEntry: fs::directory_iterator(parentPath, listErr))
|
||||
std::string dirFName = dirEntry.path().filename().string();
|
||||
if (boost::iequals(dirFName, fName))
|
||||
{
|
||||
std::string dirFName = dirEntry.path().filename().string();
|
||||
if (boost::iequals(dirFName, fName))
|
||||
{
|
||||
return dirEntry;
|
||||
}
|
||||
return dirEntry;
|
||||
}
|
||||
return fName;
|
||||
}
|
||||
return parentPath / fName;
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user