mirror of
https://github.com/cemu-project/Cemu.git
synced 2025-07-05 06:21:19 +12:00
Fix crash when permissions are missing up the tree.
This commit is contained in:
parent
d3ce33486d
commit
9bc33de652
1 changed files with 10 additions and 1 deletions
|
@ -248,7 +248,8 @@ class fscDeviceHostFSC : public fscDeviceC {
|
||||||
for (auto const &it : relPath)
|
for (auto const &it : relPath)
|
||||||
{
|
{
|
||||||
found = false;
|
found = false;
|
||||||
for (auto const& dir_entry : std::filesystem::directory_iterator{correctedPath})
|
std::error_code listErr;
|
||||||
|
for (auto const& dir_entry : std::filesystem::directory_iterator{correctedPath, listErr})
|
||||||
{
|
{
|
||||||
std::filesystem::path entry_name = dir_entry.path().filename();
|
std::filesystem::path entry_name = dir_entry.path().filename();
|
||||||
if (lowercase_path(entry_name) == lowercase_path(it))
|
if (lowercase_path(entry_name) == lowercase_path(it))
|
||||||
|
@ -258,6 +259,14 @@ class fscDeviceHostFSC : public fscDeviceC {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// if we can't iterate directory, just copy the original case.
|
||||||
|
if(listErr)
|
||||||
|
{
|
||||||
|
correctedPath /= it;
|
||||||
|
found = true;
|
||||||
|
}
|
||||||
|
|
||||||
if (!found)
|
if (!found)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue