aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/hle/service/fs/archive.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/hle/service/fs/archive.cpp')
-rw-r--r--src/core/hle/service/fs/archive.cpp19
1 files changed, 9 insertions, 10 deletions
diff --git a/src/core/hle/service/fs/archive.cpp b/src/core/hle/service/fs/archive.cpp
index 510d7320..98db02f1 100644
--- a/src/core/hle/service/fs/archive.cpp
+++ b/src/core/hle/service/fs/archive.cpp
@@ -1,5 +1,5 @@
// Copyright 2014 Citra Emulator Project
-// Licensed under GPLv2
+// Licensed under GPLv2 or any later version
// Refer to the license.txt file included.
#include <memory>
@@ -330,6 +330,14 @@ ResultCode DeleteDirectoryFromArchive(ArchiveHandle archive_handle, const FileSy
ErrorSummary::Canceled, ErrorLevel::Status);
}
+ResultCode CreateFileInArchive(Handle archive_handle, const FileSys::Path& path, u32 file_size) {
+ Archive* archive = GetArchive(archive_handle);
+ if (archive == nullptr)
+ return InvalidHandle(ErrorModule::FS);
+
+ return archive->backend->CreateFile(path, file_size);
+}
+
ResultCode CreateDirectoryFromArchive(ArchiveHandle archive_handle, const FileSys::Path& path) {
Archive* archive = GetArchive(archive_handle);
if (archive == nullptr)
@@ -420,15 +428,6 @@ void ArchiveInit() {
CreateArchive(std::move(sdmc_archive), ArchiveIdCode::SDMC);
else
LOG_ERROR(Service_FS, "Can't instantiate SDMC archive with path %s", sdmc_directory.c_str());
-
- std::string systemsavedata_directory = FileUtil::GetUserPath(D_SYSSAVEDATA_IDX);
- auto systemsavedata_archive = Common::make_unique<FileSys::Archive_SDMC>(systemsavedata_directory);
- if (systemsavedata_archive->Initialize()) {
- CreateArchive(std::move(systemsavedata_archive), ArchiveIdCode::SystemSaveData);
- } else {
- LOG_ERROR(Service_FS, "Can't instantiate SystemSaveData archive with path %s",
- systemsavedata_directory.c_str());
- }
}
/// Shutdown archives