aboutsummaryrefslogtreecommitdiff
path: root/src/core/file_sys/bis_factory.cpp
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2018-11-15 14:46:10 -0800
committerGitHub <noreply@github.com>2018-11-15 14:46:10 -0800
commit97605e36f7c572d144a8c8f0a5e1beb8ca2b0f51 (patch)
treec6f69e9269a8e6c4771b1fb338c2677d62f7c48e /src/core/file_sys/bis_factory.cpp
parent98060c6f7b4bd3a6e359fef4eefde5b31158a8de (diff)
parent1c0226815d453acfb5e1fd766765b43fd447c15c (diff)
Merge pull request #1618 from DarkLordZach/dump-nso
patch_manager: Add support for dumping uncompressed NSOs
Diffstat (limited to 'src/core/file_sys/bis_factory.cpp')
-rw-r--r--src/core/file_sys/bis_factory.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/core/file_sys/bis_factory.cpp b/src/core/file_sys/bis_factory.cpp
index 76a2b7e86..e29f70b3a 100644
--- a/src/core/file_sys/bis_factory.cpp
+++ b/src/core/file_sys/bis_factory.cpp
@@ -8,8 +8,9 @@
namespace FileSys {
-BISFactory::BISFactory(VirtualDir nand_root_, VirtualDir load_root_)
+BISFactory::BISFactory(VirtualDir nand_root_, VirtualDir load_root_, VirtualDir dump_root_)
: nand_root(std::move(nand_root_)), load_root(std::move(load_root_)),
+ dump_root(std::move(dump_root_)),
sysnand_cache(std::make_unique<RegisteredCache>(
GetOrCreateDirectoryRelative(nand_root, "/system/Contents/registered"))),
usrnand_cache(std::make_unique<RegisteredCache>(
@@ -32,4 +33,10 @@ VirtualDir BISFactory::GetModificationLoadRoot(u64 title_id) const {
return GetOrCreateDirectoryRelative(load_root, fmt::format("/{:016X}", title_id));
}
+VirtualDir BISFactory::GetModificationDumpRoot(u64 title_id) const {
+ if (title_id == 0)
+ return nullptr;
+ return GetOrCreateDirectoryRelative(dump_root, fmt::format("/{:016X}", title_id));
+}
+
} // namespace FileSys