mirror of
https://github.com/cemu-project/Cemu.git
synced 2026-07-10 01:24:41 -06:00
Compare only ASCII characters in path
This commit is contained in:
parent
459d1f4d8d
commit
fb789419c3
@ -1,4 +1,5 @@
|
||||
#include "Common/unix/FileStream_unix.h"
|
||||
#include <locale>
|
||||
|
||||
std::optional<fs::path> findPathCI(const fs::path& path)
|
||||
{
|
||||
@ -13,12 +14,12 @@ std::optional<fs::path> findPathCI(const fs::path& path)
|
||||
else
|
||||
return {};
|
||||
}
|
||||
std::string fName = path.filename().string();
|
||||
std::wstring fName = path.filename().wstring();
|
||||
if (fs::exists(parrentPath))
|
||||
for (auto&& dirEntry : fs::directory_iterator(parrentPath))
|
||||
{
|
||||
std::string dirFName = dirEntry.path().filename().string();
|
||||
if (boost::iequals(dirFName, fName))
|
||||
std::wstring dirFName = dirEntry.path().filename().wstring();
|
||||
if (boost::iequals(dirFName, fName, std::locale::classic()))
|
||||
{
|
||||
return dirEntry;
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user