summaryrefslogtreecommitdiffstats
path: root/src/core/hle/service
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/hle/service')
-rw-r--r--src/core/hle/service/fs/archive.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/core/hle/service/fs/archive.cpp b/src/core/hle/service/fs/archive.cpp
index 0c56777cf..2ce5f0fe7 100644
--- a/src/core/hle/service/fs/archive.cpp
+++ b/src/core/hle/service/fs/archive.cpp
@@ -307,13 +307,14 @@ ResultVal<Kernel::SharedPtr<File>> OpenFileFromArchive(ArchiveHandle archive_han
if (archive == nullptr)
return ERR_INVALID_HANDLE;
- std::unique_ptr<FileSys::FileBackend> backend = archive->OpenFile(path, mode);
- if (backend == nullptr) {
+ auto backend = archive->OpenFile(path, mode);
+ if (backend.Failed()) {
+ return backend.Code();
return ResultCode(ErrorDescription::FS_NotFound, ErrorModule::FS,
ErrorSummary::NotFound, ErrorLevel::Status);
}
- auto file = Kernel::SharedPtr<File>(new File(std::move(backend), path));
+ auto file = Kernel::SharedPtr<File>(new File(backend.MoveFrom(), path));
return MakeResult<Kernel::SharedPtr<File>>(std::move(file));
}