Should have caught these way earlier.

This commit is contained in:
goeiecool9999 2022-09-07 23:03:37 +02:00 committed by klaas
parent b1a01ecfdc
commit 00f8f9199b
3 changed files with 5 additions and 5 deletions

View file

@ -234,7 +234,7 @@ public:
bool fscDeviceCreateDir(std::wstring_view path, void* ctx, sint32* fscStatus) override bool fscDeviceCreateDir(std::wstring_view path, void* ctx, sint32* fscStatus) override
{ {
fs::path dirPath(path); auto dirPath = FSPath::Convert(path);
if (fs::exists(path)) if (fs::exists(path))
{ {
if (!fs::is_directory(dirPath)) if (!fs::is_directory(dirPath))
@ -253,7 +253,7 @@ public:
bool fscDeviceRemoveFileOrDir(std::wstring_view path, void* ctx, sint32* fscStatus) override bool fscDeviceRemoveFileOrDir(std::wstring_view path, void* ctx, sint32* fscStatus) override
{ {
*fscStatus = FSC_STATUS_OK; *fscStatus = FSC_STATUS_OK;
fs::path _path(path); auto _path = FSPath::Convert(path);
std::error_code ec; std::error_code ec;
if (!fs::exists(_path, ec)) if (!fs::exists(_path, ec))
{ {
@ -272,7 +272,7 @@ public:
bool fscDeviceRename(std::wstring_view srcPath, std::wstring_view dstPath, void* ctx, sint32* fscStatus) override bool fscDeviceRename(std::wstring_view srcPath, std::wstring_view dstPath, void* ctx, sint32* fscStatus) override
{ {
*fscStatus = FSC_STATUS_OK; *fscStatus = FSC_STATUS_OK;
fs::path _srcPath(srcPath); auto _srcPath = FSPath::Convert(srcPath);
fs::path _dstPath(dstPath); fs::path _dstPath(dstPath);
std::error_code ec; std::error_code ec;
if (!fs::exists(_srcPath, ec)) if (!fs::exists(_srcPath, ec))

View file

@ -16,7 +16,7 @@ std::string SaveInfo::GetStorageSubpathByTitleId(TitleId titleId)
return fmt::format("usr/save/{:08x}/{:08x}", ((uint64)titleId) >> 32, (uint64)titleId & 0xFFFFFFFF); return fmt::format("usr/save/{:08x}/{:08x}", ((uint64)titleId) >> 32, (uint64)titleId & 0xFFFFFFFF);
} }
fs::path SaveInfo::GetSavePath(TitleId titleId) FSPath SaveInfo::GetSavePath(TitleId titleId)
{ {
return ActiveSettings::GetMlcPath(GetStorageSubpathByTitleId(titleId)); return ActiveSettings::GetMlcPath(GetStorageSubpathByTitleId(titleId));
} }

View file

@ -21,7 +21,7 @@ public:
private: private:
static std::string GetStorageSubpathByTitleId(TitleId titleId); static std::string GetStorageSubpathByTitleId(TitleId titleId);
static fs::path GetSavePath(TitleId titleId); static FSPath GetSavePath(TitleId titleId);
TitleId m_titleId; TitleId m_titleId;
FSPath m_path; FSPath m_path;