Fix case-insensitive path comparisons when using wide string

This commit is contained in:
Jean Pierre Cimalando 2020-09-27 15:11:47 +02:00
parent 4a90ae166a
commit 6223fe5336

View file

@ -160,8 +160,13 @@ bool sfz::FilePool::checkSample(std::string& filename) const noexcept
}
auto searchPredicate = [&part](const fs::directory_entry &ent) -> bool {
#if !defined(GHC_USE_WCHAR_T)
return absl::EqualsIgnoreCase(
ent.path().filename().native(), part.native());
#else
return absl::EqualsIgnoreCase(
ent.path().filename().u8string(), part.u8string());
#endif
};
while (it != fs::directory_iterator{} && !searchPredicate(*it))