mirror of
https://github.com/cemu-project/Cemu.git
synced 2026-06-03 21:24:59 -06:00
unix: handle edge case where path does not exist
fixes crash when passing an invalid path with the "-g" launch option the algorithm would recurse up the tree infinitely looking for blank parent directories probably fixes more things
This commit is contained in:
parent
2913a8ca7a
commit
a1d47c37b6
@ -7,6 +7,9 @@ fs::path findPathCI(const fs::path& path)
|
|||||||
|
|
||||||
fs::path fName = path.filename();
|
fs::path fName = path.filename();
|
||||||
fs::path parentPath = path.parent_path();
|
fs::path parentPath = path.parent_path();
|
||||||
|
if (parentPath.empty())
|
||||||
|
return path;
|
||||||
|
|
||||||
if (!fs::exists(parentPath))
|
if (!fs::exists(parentPath))
|
||||||
{
|
{
|
||||||
auto CIParent = findPathCI(parentPath);
|
auto CIParent = findPathCI(parentPath);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user