diff --git a/hactoolnet/CliParser.cs b/hactoolnet/CliParser.cs
index 71e418f6..c097b771 100644
--- a/hactoolnet/CliParser.cs
+++ b/hactoolnet/CliParser.cs
@@ -156,6 +156,7 @@ namespace hactoolnet
sb.AppendLine(" --section1dir
Specify Section 1 directory path.");
sb.AppendLine(" --section2dir Specify Section 2 directory path.");
sb.AppendLine(" --section3dir Specify Section 3 directory path.");
+ sb.AppendLine(" --romfsdir Specify main RomFS directory path.");
sb.AppendLine(" --listromfs List files in RomFS.");
sb.AppendLine(" --basenca Set Base NCA to use with update partitions.");
sb.AppendLine("XCI options:");
diff --git a/hactoolnet/Program.cs b/hactoolnet/Program.cs
index d516ec29..95239873 100644
--- a/hactoolnet/Program.cs
+++ b/hactoolnet/Program.cs
@@ -249,7 +249,7 @@ namespace hactoolnet
}
}
- if (ctx.Options.RomfsOutDir != null)
+ if (ctx.Options.RomfsOutDir != null || ctx.Options.RomfsOut != null)
{
if (xci.SecurePartition == null)
{
@@ -284,8 +284,16 @@ namespace hactoolnet
return;
}
- var romfs = new Romfs(mainNca.OpenSection(romfsSection.SectionNum, false));
- romfs.Extract(ctx.Options.RomfsOutDir, ctx.Logger);
+ if (ctx.Options.RomfsOutDir != null)
+ {
+ var romfs = new Romfs(mainNca.OpenSection(romfsSection.SectionNum, false));
+ romfs.Extract(ctx.Options.RomfsOutDir, ctx.Logger);
+ }
+
+ if (ctx.Options.RomfsOut != null)
+ {
+ mainNca.ExportSection(romfsSection.SectionNum, ctx.Options.RomfsOut, ctx.Options.Raw, ctx.Logger);
+ }
}
}
}