summaryrefslogtreecommitdiffstats
path: root/src/core/file_sys/archive_sdmc.cpp
diff options
context:
space:
mode:
authorYuri Kunde Schlesner <yuriks@yuriks.net>2015-02-06 14:53:14 +0100
committerYuri Kunde Schlesner <yuriks@yuriks.net>2015-02-10 16:43:44 +0100
commit3f1a3952d707bce7851652ce54701ca14334f314 (patch)
tree04c79ff9887f0074813276cdf989e6814901e943 /src/core/file_sys/archive_sdmc.cpp
parentFS: Get rid of completely useless Archive class (diff)
downloadyuzu-3f1a3952d707bce7851652ce54701ca14334f314.tar
yuzu-3f1a3952d707bce7851652ce54701ca14334f314.tar.gz
yuzu-3f1a3952d707bce7851652ce54701ca14334f314.tar.bz2
yuzu-3f1a3952d707bce7851652ce54701ca14334f314.tar.lz
yuzu-3f1a3952d707bce7851652ce54701ca14334f314.tar.xz
yuzu-3f1a3952d707bce7851652ce54701ca14334f314.tar.zst
yuzu-3f1a3952d707bce7851652ce54701ca14334f314.zip
Diffstat (limited to 'src/core/file_sys/archive_sdmc.cpp')
-rw-r--r--src/core/file_sys/archive_sdmc.cpp17
1 files changed, 14 insertions, 3 deletions
diff --git a/src/core/file_sys/archive_sdmc.cpp b/src/core/file_sys/archive_sdmc.cpp
index 26b03e82f..92b20c7f6 100644
--- a/src/core/file_sys/archive_sdmc.cpp
+++ b/src/core/file_sys/archive_sdmc.cpp
@@ -6,6 +6,7 @@
#include "common/common_types.h"
#include "common/file_util.h"
+#include "common/make_unique.h"
#include "core/file_sys/archive_sdmc.h"
#include "core/file_sys/disk_archive.h"
@@ -16,17 +17,17 @@
namespace FileSys {
-Archive_SDMC::Archive_SDMC(const std::string& sdmc_directory) : DiskArchive(sdmc_directory) {
+ArchiveFactory_SDMC::ArchiveFactory_SDMC(const std::string& sdmc_directory) : sdmc_directory(sdmc_directory) {
LOG_INFO(Service_FS, "Directory %s set as SDMC.", sdmc_directory.c_str());
}
-bool Archive_SDMC::Initialize() {
+bool ArchiveFactory_SDMC::Initialize() {
if (!Settings::values.use_virtual_sd) {
LOG_WARNING(Service_FS, "SDMC disabled by config.");
return false;
}
- if (!FileUtil::CreateFullPath(mount_point)) {
+ if (!FileUtil::CreateFullPath(sdmc_directory)) {
LOG_ERROR(Service_FS, "Unable to create SDMC path.");
return false;
}
@@ -34,4 +35,14 @@ bool Archive_SDMC::Initialize() {
return true;
}
+ResultVal<std::unique_ptr<ArchiveBackend>> ArchiveFactory_SDMC::Open(const Path& path) {
+ auto archive = Common::make_unique<DiskArchive>(sdmc_directory);
+ return MakeResult<std::unique_ptr<ArchiveBackend>>(std::move(archive));
+}
+
+ResultCode ArchiveFactory_SDMC::Format(const Path& path) {
+ // This is kind of an undesirable operation, so let's just ignore it. :)
+ return RESULT_SUCCESS;
+}
+
} // namespace FileSys