diff options
Diffstat (limited to 'src/core/hle/service/fs/archive.cpp')
-rw-r--r-- | src/core/hle/service/fs/archive.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/core/hle/service/fs/archive.cpp b/src/core/hle/service/fs/archive.cpp index 98db02f15..487bf3aa7 100644 --- a/src/core/hle/service/fs/archive.cpp +++ b/src/core/hle/service/fs/archive.cpp @@ -133,7 +133,7 @@ public: case FileCommand::Close: { LOG_TRACE(Service_FS, "Close %s %s", GetTypeName().c_str(), GetName().c_str()); - Kernel::g_object_pool.Destroy<File>(GetHandle()); + backend->Close(); break; } @@ -189,7 +189,7 @@ public: case DirectoryCommand::Close: { LOG_TRACE(Service_FS, "Close %s %s", GetTypeName().c_str(), GetName().c_str()); - Kernel::g_object_pool.Destroy<Directory>(GetHandle()); + backend->Close(); break; } @@ -283,7 +283,8 @@ ResultVal<Handle> OpenFileFromArchive(ArchiveHandle archive_handle, const FileSy } auto file = Common::make_unique<File>(std::move(backend), path); - Handle handle = Kernel::g_object_pool.Create(file.release()); + // TOOD(yuriks): Fix error reporting + Handle handle = Kernel::g_handle_table.Create(file.release()).ValueOr(INVALID_HANDLE); return MakeResult<Handle>(handle); } @@ -388,7 +389,8 @@ ResultVal<Handle> OpenDirectoryFromArchive(ArchiveHandle archive_handle, const F } auto directory = Common::make_unique<Directory>(std::move(backend), path); - Handle handle = Kernel::g_object_pool.Create(directory.release()); + // TOOD(yuriks): Fix error reporting + Handle handle = Kernel::g_handle_table.Create(directory.release()).ValueOr(INVALID_HANDLE); return MakeResult<Handle>(handle); } |