mirror of
https://github.com/cemu-project/Cemu.git
synced 2025-12-15 01:36:59 +00:00
FSC: Use utf8 path strings instead of wchar
Also introduced helper function _utf8ToPath() to convert a utf8-encoded string to fs::path
This commit is contained in:
parent
1ce629126a
commit
168ecf8825
9 changed files with 38 additions and 43 deletions
|
|
@ -119,14 +119,12 @@ private:
|
|||
|
||||
class fscDeviceWUAC : public fscDeviceC
|
||||
{
|
||||
FSCVirtualFile* fscDeviceOpenByPath(std::wstring_view path, FSC_ACCESS_FLAG accessFlags, void* ctx, sint32* fscStatus) override
|
||||
FSCVirtualFile* fscDeviceOpenByPath(std::string_view path, FSC_ACCESS_FLAG accessFlags, void* ctx, sint32* fscStatus) override
|
||||
{
|
||||
ZArchiveReader* archive = (ZArchiveReader*)ctx;
|
||||
cemu_assert_debug(!HAS_FLAG(accessFlags, FSC_ACCESS_FLAG::WRITE_PERMISSION)); // writing to WUA is not supported
|
||||
|
||||
std::string pathU8 = boost::nowide::narrow(path.data(), path.size());
|
||||
|
||||
ZArchiveNodeHandle fileHandle = archive->LookUp(pathU8, true, true);
|
||||
ZArchiveNodeHandle fileHandle = archive->LookUp(path, true, true);
|
||||
if (fileHandle == ZARCHIVE_INVALID_NODE)
|
||||
{
|
||||
*fscStatus = FSC_STATUS_FILE_NOT_FOUND;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue