unix: simplify the case-insensitivity algorithm

This commit is contained in:
goeiecool9999
2026-04-03 02:47:52 +02:00
parent 72b5740ed4
commit fd1a1d1688
+2 -7
View File
@@ -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))