diff --git a/src/core/file_sys/archive_backend.h b/src/core/file_sys/archive_backend.h index 800ac1541..94cda172f 100644 --- a/src/core/file_sys/archive_backend.h +++ b/src/core/file_sys/archive_backend.h @@ -172,7 +172,7 @@ public: */ virtual ResultCode Format(const Path& path, const FileSys::ArchiveFormatInfo& format_info) = 0; - /* + /** * Retrieves the format info about the archive with the specified path * @param path Path to the archive * @return Format information about the archive or error code diff --git a/src/core/file_sys/archive_extsavedata.cpp b/src/core/file_sys/archive_extsavedata.cpp index e83a6153d..ca7fd5c5e 100644 --- a/src/core/file_sys/archive_extsavedata.cpp +++ b/src/core/file_sys/archive_extsavedata.cpp @@ -117,7 +117,7 @@ ResultVal ArchiveFactory_ExtSaveData::GetFormatInfo(const Pat return ResultCode(ErrorDescription::FS_NotFormatted, ErrorModule::FS, ErrorSummary::InvalidState, ErrorLevel::Status); } -void ArchiveFactory_ExtSaveData::WriteIcon(const Path& path, u8* icon_data, u32 icon_size) { +void ArchiveFactory_ExtSaveData::WriteIcon(const Path& path, const u8* icon_data, u32 icon_size) { std::string game_path = FileSys::GetExtSaveDataPath(GetMountPoint(), path); FileUtil::IOFile icon_file(game_path + "icon", "wb+"); icon_file.WriteBytes(icon_data, icon_size); diff --git a/src/core/file_sys/archive_extsavedata.h b/src/core/file_sys/archive_extsavedata.h index 48e092ee7..1ebe0529f 100644 --- a/src/core/file_sys/archive_extsavedata.h +++ b/src/core/file_sys/archive_extsavedata.h @@ -36,13 +36,13 @@ public: const std::string& GetMountPoint() const { return mount_point; } - /* + /** * Writes the SMDH icon of the ExtSaveData to file * @param path Path of this ExtSaveData * @param icon_data Binary data of the icon * @param icon_size Size of the icon data */ - void WriteIcon(const Path& path, u8* icon_data, u32 icon_size); + void WriteIcon(const Path& path, const u8* icon_data, u32 icon_size); private: /** diff --git a/src/core/hle/service/cfg/cfg.cpp b/src/core/hle/service/cfg/cfg.cpp index 7bd949604..dba0e10ac 100644 --- a/src/core/hle/service/cfg/cfg.cpp +++ b/src/core/hle/service/cfg/cfg.cpp @@ -309,6 +309,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 diff --git a/src/core/hle/service/fs/archive.cpp b/src/core/hle/service/fs/archive.cpp index 63381250a..676a2ee56 100644 --- a/src/core/hle/service/fs/archive.cpp +++ b/src/core/hle/service/fs/archive.cpp @@ -308,11 +308,8 @@ ResultVal> OpenFileFromArchive(ArchiveHandle archive_han return ERR_INVALID_HANDLE; auto backend = archive->OpenFile(path, mode); - if (backend.Failed()) { + if (backend.Failed()) return backend.Code(); - return ResultCode(ErrorDescription::FS_NotFound, ErrorModule::FS, - ErrorSummary::NotFound, ErrorLevel::Status); - } auto file = Kernel::SharedPtr(new File(backend.MoveFrom(), path)); return MakeResult>(std::move(file)); diff --git a/src/core/hle/service/fs/archive.h b/src/core/hle/service/fs/archive.h index b17d7c902..006606740 100644 --- a/src/core/hle/service/fs/archive.h +++ b/src/core/hle/service/fs/archive.h @@ -183,7 +183,7 @@ ResultVal GetFreeBytesInArchive(ArchiveHandle archive_handle); */ ResultCode FormatArchive(ArchiveIdCode id_code, const FileSys::ArchiveFormatInfo& format_info, const FileSys::Path& path = FileSys::Path()); -/* +/** * Retrieves the format info about the archive of the specified type and path. * The format info is supplied by the client code when creating archives. * @param id_code The id of the archive