From a1d47c37b670452acb2484045dc18c37f772d2ef Mon Sep 17 00:00:00 2001 From: goeiecool9999 <7033575+goeiecool9999@users.noreply.github.com> Date: Fri, 3 Apr 2026 01:07:37 +0200 Subject: [PATCH] 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 --- src/Common/unix/FileStream_unix.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Common/unix/FileStream_unix.cpp b/src/Common/unix/FileStream_unix.cpp index 0e9f1189..33ce5f10 100644 --- a/src/Common/unix/FileStream_unix.cpp +++ b/src/Common/unix/FileStream_unix.cpp @@ -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);