From 9af72c9717ae31a7b3f490a878d893bef7f66155 Mon Sep 17 00:00:00 2001 From: Iliyas Jorio Date: Tue, 19 Sep 2023 21:02:57 +0200 Subject: [PATCH] Optional case-sensitive FSSpec --- src/Files/HostVolume.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/Files/HostVolume.cpp b/src/Files/HostVolume.cpp index 7b3845f..999a4b0 100644 --- a/src/Files/HostVolume.cpp +++ b/src/Files/HostVolume.cpp @@ -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;