mirror of
https://github.com/cemu-project/Cemu.git
synced 2026-09-30 04:56:26 -05: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:
@@ -7,6 +7,9 @@ fs::path findPathCI(const fs::path& path)
|
||||
|
||||
fs::path fName = path.filename();
|
||||
fs::path parentPath = path.parent_path();
|
||||
if (parentPath.empty())
|
||||
return path;
|
||||
|
||||
if (!fs::exists(parentPath))
|
||||
{
|
||||
auto CIParent = findPathCI(parentPath);
|
||||
|
||||
Reference in New Issue
Block a user