diff --git a/source/hactool_processor.app_fs.cpp b/source/hactool_processor.app_fs.cpp index 9f78d0e..a10a960 100644 --- a/source/hactool_processor.app_fs.cpp +++ b/source/hactool_processor.app_fs.cpp @@ -449,6 +449,11 @@ namespace ams::hactool { } void Processor::SaveAsApplicationFileSystem(ProcessAsApplicationFileSystemContext &ctx) { + /* Save the target application's program nca. */ + if (ctx.has_target) { + this->SaveAsNca(ctx.app_nca_ctx); + } + /* TODO */ AMS_UNUSED(ctx); } diff --git a/source/hactool_processor.xci.cpp b/source/hactool_processor.xci.cpp index f1fbfe7..2323ad1 100644 --- a/source/hactool_processor.xci.cpp +++ b/source/hactool_processor.xci.cpp @@ -373,7 +373,10 @@ namespace ams::hactool { if (m_options.secure_partition_out_dir != nullptr) { ExtractDirectoryWithProgress(m_local_fs, ctx.secure_partition.fs, "secure:", m_options.secure_partition_out_dir, "/"); } if (m_options.update_partition_out_dir != nullptr) { ExtractDirectoryWithProgress(m_local_fs, ctx.update_partition.fs, "update:", m_options.update_partition_out_dir, "/"); } - /* TODO: Recurse, dump NCAs? */ + /* Save the application filesystem. */ + if (ctx.secure_partition.fs != nullptr) { + this->SaveAsApplicationFileSystem(ctx.app_ctx); + } } } \ No newline at end of file