summaryrefslogtreecommitdiffstats
path: root/src/core/hle/service/cfg
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2016-03-20 21:11:49 +0100
committerbunnei <bunneidev@gmail.com>2016-03-20 21:11:49 +0100
commitb83e95727f95fa6fe35d436be3e821605244a6a8 (patch)
tree64255c7432e882205a2dbea1fe962025863664ee /src/core/hle/service/cfg
parentMerge pull request #1550 from LittleWhite-tb/gdbstub_include_fix (diff)
parentHLE/FS: Change the error code returned when an ExtSaveData archive is not found. (diff)
downloadyuzu-b83e95727f95fa6fe35d436be3e821605244a6a8.tar
yuzu-b83e95727f95fa6fe35d436be3e821605244a6a8.tar.gz
yuzu-b83e95727f95fa6fe35d436be3e821605244a6a8.tar.bz2
yuzu-b83e95727f95fa6fe35d436be3e821605244a6a8.tar.lz
yuzu-b83e95727f95fa6fe35d436be3e821605244a6a8.tar.xz
yuzu-b83e95727f95fa6fe35d436be3e821605244a6a8.tar.zst
yuzu-b83e95727f95fa6fe35d436be3e821605244a6a8.zip
Diffstat (limited to 'src/core/hle/service/cfg')
-rw-r--r--src/core/hle/service/cfg/cfg.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/core/hle/service/cfg/cfg.cpp b/src/core/hle/service/cfg/cfg.cpp
index 4c82a58e4..525432957 100644
--- a/src/core/hle/service/cfg/cfg.cpp
+++ b/src/core/hle/service/cfg/cfg.cpp
@@ -310,7 +310,8 @@ ResultCode UpdateConfigNANDSavegame() {
ResultCode FormatConfig() {
ResultCode res = DeleteConfigNANDSaveFile();
- if (!res.IsSuccess())
+ // The delete command fails if the file doesn't exist, so we have to check that too
+ if (!res.IsSuccess() && res.description != ErrorDescription::FS_NotFound)
return res;
// Delete the old data
cfg_config_file_buffer.fill(0);
@@ -407,7 +408,7 @@ void Init() {
// If the archive didn't exist, create the files inside
if (archive_result.Code().description == ErrorDescription::FS_NotFormatted) {
// Format the archive to create the directories
- Service::FS::FormatArchive(Service::FS::ArchiveIdCode::SystemSaveData, archive_path);
+ Service::FS::FormatArchive(Service::FS::ArchiveIdCode::SystemSaveData, FileSys::ArchiveFormatInfo(), archive_path);
// Open it again to get a valid archive now that the folder exists
archive_result = Service::FS::OpenArchive(Service::FS::ArchiveIdCode::SystemSaveData, archive_path);