From fd1a1d16885783c0a5c3527b59254bd17220ff31 Mon Sep 17 00:00:00 2001 From: goeiecool9999 <7033575+goeiecool9999@users.noreply.github.com> Date: Fri, 3 Apr 2026 02:47:52 +0200 Subject: [PATCH] unix: simplify the case-insensitivity algorithm --- src/Common/unix/FileStream_unix.cpp | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/Common/unix/FileStream_unix.cpp b/src/Common/unix/FileStream_unix.cpp index e7b6cf7b..53880527 100644 --- a/src/Common/unix/FileStream_unix.cpp +++ b/src/Common/unix/FileStream_unix.cpp @@ -9,13 +9,8 @@ fs::path findPathCI(const fs::path& path) fs::path parentPath = path.parent_path(); if (parentPath.empty()) parentPath = "."; - - if (!fs::exists(parentPath)) - { - auto CIParent = findPathCI(parentPath); - if (fs::exists(CIParent)) - return findPathCI(CIParent / fName); - } + else if (!fs::exists(parentPath)) + parentPath = findPathCI(parentPath); std::error_code listErr; for (auto&& dirEntry : fs::directory_iterator(parentPath, listErr))