Fix case-insensitive path comparisons when using wide string
This commit is contained in:
parent
4a90ae166a
commit
6223fe5336
1 changed files with 5 additions and 0 deletions
|
|
@ -160,8 +160,13 @@ bool sfz::FilePool::checkSample(std::string& filename) const noexcept
|
||||||
}
|
}
|
||||||
|
|
||||||
auto searchPredicate = [&part](const fs::directory_entry &ent) -> bool {
|
auto searchPredicate = [&part](const fs::directory_entry &ent) -> bool {
|
||||||
|
#if !defined(GHC_USE_WCHAR_T)
|
||||||
return absl::EqualsIgnoreCase(
|
return absl::EqualsIgnoreCase(
|
||||||
ent.path().filename().native(), part.native());
|
ent.path().filename().native(), part.native());
|
||||||
|
#else
|
||||||
|
return absl::EqualsIgnoreCase(
|
||||||
|
ent.path().filename().u8string(), part.u8string());
|
||||||
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
while (it != fs::directory_iterator{} && !searchPredicate(*it))
|
while (it != fs::directory_iterator{} && !searchPredicate(*it))
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue