summaryrefslogtreecommitdiffstats
path: root/src/core/file_sys/archive_sdmc.cpp
diff options
context:
space:
mode:
authorwwylele <wwylele@gmail.com>2016-10-20 05:45:01 +0200
committerwwylele <wwylele@gmail.com>2016-11-19 17:55:34 +0100
commit0647f866498412f22999966cc97b122db2ef9318 (patch)
tree701dc82743f1aae1361d4a0a281416ca354c7ba8 /src/core/file_sys/archive_sdmc.cpp
parentFileSys: add SDMCWriteOnlyArchive (diff)
downloadyuzu-0647f866498412f22999966cc97b122db2ef9318.tar
yuzu-0647f866498412f22999966cc97b122db2ef9318.tar.gz
yuzu-0647f866498412f22999966cc97b122db2ef9318.tar.bz2
yuzu-0647f866498412f22999966cc97b122db2ef9318.tar.lz
yuzu-0647f866498412f22999966cc97b122db2ef9318.tar.xz
yuzu-0647f866498412f22999966cc97b122db2ef9318.tar.zst
yuzu-0647f866498412f22999966cc97b122db2ef9318.zip
Diffstat (limited to 'src/core/file_sys/archive_sdmc.cpp')
-rw-r--r--src/core/file_sys/archive_sdmc.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/core/file_sys/archive_sdmc.cpp b/src/core/file_sys/archive_sdmc.cpp
index c747ba82c..333dfb92e 100644
--- a/src/core/file_sys/archive_sdmc.cpp
+++ b/src/core/file_sys/archive_sdmc.cpp
@@ -19,6 +19,17 @@ namespace FileSys {
ResultVal<std::unique_ptr<FileBackend>> SDMCArchive::OpenFile(const Path& path,
const Mode& mode) const {
+ Mode modified_mode;
+ modified_mode.hex = mode.hex;
+
+ // SDMC archive always opens a file with at least read permission
+ modified_mode.read_flag.Assign(1);
+
+ return OpenFileBase(path, modified_mode);
+}
+
+ResultVal<std::unique_ptr<FileBackend>> SDMCArchive::OpenFileBase(const Path& path,
+ const Mode& mode) const {
LOG_DEBUG(Service_FS, "called path=%s mode=%01X", path.DebugStr().c_str(), mode.hex);
const PathParser path_parser(path);