From d26c6b3212ed36970410814593ee5ec082b1d95a Mon Sep 17 00:00:00 2001 From: Subv Date: Mon, 28 Dec 2015 13:51:44 -0500 Subject: HLE/FS: Implemented GetFormatInfo Format information is currently only implemented for the ExtSaveData, SharedExtSaveData and SaveData archives, the information is stored in a file alongside the root folder of the archive. --- src/core/hle/service/cfg/cfg.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/core/hle/service/cfg/cfg.cpp') diff --git a/src/core/hle/service/cfg/cfg.cpp b/src/core/hle/service/cfg/cfg.cpp index 4c82a58e4..7bcedc0ae 100644 --- a/src/core/hle/service/cfg/cfg.cpp +++ b/src/core/hle/service/cfg/cfg.cpp @@ -407,7 +407,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); -- cgit v1.2.3 From 95380d895056d8f1336daec95c41c1b022ae2564 Mon Sep 17 00:00:00 2001 From: Subv Date: Mon, 28 Dec 2015 14:25:32 -0500 Subject: HLE/FS: Fixed creating the config savefile when it doesn't exist. This fixes a regression. --- src/core/hle/service/cfg/cfg.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/core/hle/service/cfg/cfg.cpp') diff --git a/src/core/hle/service/cfg/cfg.cpp b/src/core/hle/service/cfg/cfg.cpp index 7bcedc0ae..bb2c55612 100644 --- a/src/core/hle/service/cfg/cfg.cpp +++ b/src/core/hle/service/cfg/cfg.cpp @@ -310,7 +310,7 @@ ResultCode UpdateConfigNANDSavegame() { ResultCode FormatConfig() { ResultCode res = DeleteConfigNANDSaveFile(); - if (!res.IsSuccess()) + if (!res.IsSuccess() && res.description != ErrorDescription::FS_NotFound) return res; // Delete the old data cfg_config_file_buffer.fill(0); -- cgit v1.2.3 From 3aa42627a3a35d8a4fb9acdcced24977d1f269cd Mon Sep 17 00:00:00 2001 From: Subv Date: Sat, 16 Jan 2016 17:01:01 -0500 Subject: HLE/FS: Corrected some style concerns. --- src/core/hle/service/cfg/cfg.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'src/core/hle/service/cfg/cfg.cpp') diff --git a/src/core/hle/service/cfg/cfg.cpp b/src/core/hle/service/cfg/cfg.cpp index bb2c55612..525432957 100644 --- a/src/core/hle/service/cfg/cfg.cpp +++ b/src/core/hle/service/cfg/cfg.cpp @@ -310,6 +310,7 @@ ResultCode UpdateConfigNANDSavegame() { ResultCode FormatConfig() { ResultCode res = DeleteConfigNANDSaveFile(); + // 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 -- cgit v1.2.3