summaryrefslogtreecommitdiffstats
path: root/src/core/file_sys
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2018-10-18 00:22:05 +0200
committerGitHub <noreply@github.com>2018-10-18 00:22:05 +0200
commitafe22d8405e229154fd34d3d2f868af7b2871250 (patch)
treefbc2ab1f9860d82203d13535818f1abe927a905f /src/core/file_sys
parentMerge pull request #1443 from DarkLordZach/lower-loader-logs-1 (diff)
parentsavedata_factory: Add TemporaryStorage SaveDataSpaceId (diff)
downloadyuzu-afe22d8405e229154fd34d3d2f868af7b2871250.tar
yuzu-afe22d8405e229154fd34d3d2f868af7b2871250.tar.gz
yuzu-afe22d8405e229154fd34d3d2f868af7b2871250.tar.bz2
yuzu-afe22d8405e229154fd34d3d2f868af7b2871250.tar.lz
yuzu-afe22d8405e229154fd34d3d2f868af7b2871250.tar.xz
yuzu-afe22d8405e229154fd34d3d2f868af7b2871250.tar.zst
yuzu-afe22d8405e229154fd34d3d2f868af7b2871250.zip
Diffstat (limited to 'src/core/file_sys')
-rw-r--r--src/core/file_sys/savedata_factory.cpp13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/core/file_sys/savedata_factory.cpp b/src/core/file_sys/savedata_factory.cpp
index 47f2ab9e0..ef1aaebbb 100644
--- a/src/core/file_sys/savedata_factory.cpp
+++ b/src/core/file_sys/savedata_factory.cpp
@@ -51,6 +51,13 @@ ResultVal<VirtualDir> SaveDataFactory::Open(SaveDataSpaceId space, SaveDataDescr
meta.title_id);
}
+ if (meta.type == SaveDataType::DeviceSaveData && meta.user_id != u128{0, 0}) {
+ LOG_WARNING(Service_FS,
+ "Possibly incorrect SaveDataDescriptor, type is DeviceSaveData but user_id is "
+ "non-zero ({:016X}{:016X})",
+ meta.user_id[1], meta.user_id[0]);
+ }
+
std::string save_directory =
GetFullPath(space, meta.type, meta.title_id, meta.user_id, meta.save_id);
@@ -92,6 +99,9 @@ std::string SaveDataFactory::GetFullPath(SaveDataSpaceId space, SaveDataType typ
case SaveDataSpaceId::NandUser:
out = "/user/";
break;
+ case SaveDataSpaceId::TemporaryStorage:
+ out = "/temp/";
+ break;
default:
ASSERT_MSG(false, "Unrecognized SaveDataSpaceId: {:02X}", static_cast<u8>(space));
}
@@ -100,10 +110,11 @@ std::string SaveDataFactory::GetFullPath(SaveDataSpaceId space, SaveDataType typ
case SaveDataType::SystemSaveData:
return fmt::format("{}save/{:016X}/{:016X}{:016X}", out, save_id, user_id[1], user_id[0]);
case SaveDataType::SaveData:
+ case SaveDataType::DeviceSaveData:
return fmt::format("{}save/{:016X}/{:016X}{:016X}/{:016X}", out, 0, user_id[1], user_id[0],
title_id);
case SaveDataType::TemporaryStorage:
- return fmt::format("{}temp/{:016X}/{:016X}{:016X}/{:016X}", out, 0, user_id[1], user_id[0],
+ return fmt::format("{}{:016X}/{:016X}{:016X}/{:016X}", out, 0, user_id[1], user_id[0],
title_id);
default:
ASSERT_MSG(false, "Unrecognized SaveDataType: {:02X}", static_cast<u8>(type));