Optional case-sensitive FSSpec

This commit is contained in:
Iliyas Jorio 2023-09-19 21:02:57 +02:00
parent d9d1f906c5
commit 9af72c9717
1 changed files with 13 additions and 0 deletions

View File

@ -183,6 +183,18 @@ static bool CaseInsensitiveAppendToPath(fs::path& path, const u8string& element,
return true;
}
#if POMME_CASE_SENSITIVE_FSSPEC
if (!skipFiles)
{
fs::path candidateResourcePath = naiveConcat;
candidateResourcePath += ".rsrc";
if (fs::is_regular_file(candidateResourcePath))
{
path = naiveConcat;
return true;
}
}
#else
// Convert path element to uppercase for case-insensitive comparisons
const auto uppercaseElement = UppercaseCopy(element);
@ -210,6 +222,7 @@ static bool CaseInsensitiveAppendToPath(fs::path& path, const u8string& element,
return true;
}
}
#endif
path = naiveConcat;
return false;