diff options
author | Subv <subv2112@gmail.com> | 2016-03-03 19:05:50 +0100 |
---|---|---|
committer | Subv <subv2112@gmail.com> | 2016-03-20 20:52:50 +0100 |
commit | f707026ac50c53716ac697ed439630d7728e9db6 (patch) | |
tree | 6e8b20bcfb2e72645a7f098c78574917f613452e /src/core/file_sys/archive_savedata.cpp | |
parent | HLE/FS: Corrected some style concerns. (diff) | |
download | yuzu-f707026ac50c53716ac697ed439630d7728e9db6.tar yuzu-f707026ac50c53716ac697ed439630d7728e9db6.tar.gz yuzu-f707026ac50c53716ac697ed439630d7728e9db6.tar.bz2 yuzu-f707026ac50c53716ac697ed439630d7728e9db6.tar.lz yuzu-f707026ac50c53716ac697ed439630d7728e9db6.tar.xz yuzu-f707026ac50c53716ac697ed439630d7728e9db6.tar.zst yuzu-f707026ac50c53716ac697ed439630d7728e9db6.zip |
Diffstat (limited to '')
-rw-r--r-- | src/core/file_sys/archive_savedata.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/core/file_sys/archive_savedata.cpp b/src/core/file_sys/archive_savedata.cpp index c2d32ed7e..fe020d21c 100644 --- a/src/core/file_sys/archive_savedata.cpp +++ b/src/core/file_sys/archive_savedata.cpp @@ -77,15 +77,15 @@ ResultVal<ArchiveFormatInfo> ArchiveFactory_SaveData::GetFormatInfo(const Path& std::string metadata_path = GetSaveDataMetadataPath(mount_point, Kernel::g_current_process->codeset->program_id); FileUtil::IOFile file(metadata_path, "rb"); - if (file.IsOpen()) { - ArchiveFormatInfo info; - file.ReadBytes(&info, sizeof(info)); - return MakeResult<ArchiveFormatInfo>(info); + if (!file.IsOpen()) { + LOG_ERROR(Service_FS, "Could not open metadata information for archive"); + // TODO(Subv): Verify error code + return ResultCode(ErrorDescription::FS_NotFormatted, ErrorModule::FS, ErrorSummary::InvalidState, ErrorLevel::Status); } - LOG_ERROR(Service_FS, "Could not open metadata information for archive"); - // TODO(Subv): Verify error code - return ResultCode(ErrorDescription::FS_NotFormatted, ErrorModule::FS, ErrorSummary::InvalidState, ErrorLevel::Status); + ArchiveFormatInfo info = {}; + file.ReadBytes(&info, sizeof(info)); + return MakeResult<ArchiveFormatInfo>(info); } } // namespace FileSys |