From e9bb0ae00ae2cb18906c2a4e943283054b43af3b Mon Sep 17 00:00:00 2001 From: Deterous <138427222+Deterous@users.noreply.github.com> Date: Thu, 1 Feb 2024 10:55:23 +0900 Subject: [PATCH] Allow for output folder argument, bump version --- IRDKit/IRDKit.csproj | 2 +- IRDKit/Program.cs | 6 ++++++ LibIRD/IRD.cs | 2 +- LibIRD/LibIRD.csproj | 2 +- 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/IRDKit/IRDKit.csproj b/IRDKit/IRDKit.csproj index e89dff9..254f456 100644 --- a/IRDKit/IRDKit.csproj +++ b/IRDKit/IRDKit.csproj @@ -10,7 +10,7 @@ win-x86;win-x64;win-arm64;linux-x64;linux-arm64;osx-x64;osx-arm64 latest true - 0.3.2 + 0.3.3 Deterous diff --git a/IRDKit/Program.cs b/IRDKit/Program.cs index adee46c..d200115 100644 --- a/IRDKit/Program.cs +++ b/IRDKit/Program.cs @@ -668,7 +668,13 @@ namespace IRDKit return null; } + // Determine IRD path if only folder given + if (Directory.Exists(irdPath)) + irdPath = Path.Combine(irdPath, Path.GetFileName(Path.ChangeExtension(isoPath, ".ird"))); + // Determine IRD path if none given + if (irdPath == string.Empty) + irdPath = Path.GetFileName(Path.ChangeExtension(isoPath, ".ird")); irdPath ??= Path.ChangeExtension(isoPath, ".ird"); // Create new reproducible redump-style IRD with a given hex key diff --git a/LibIRD/IRD.cs b/LibIRD/IRD.cs index d966727..9e4151c 100644 --- a/LibIRD/IRD.cs +++ b/LibIRD/IRD.cs @@ -721,7 +721,7 @@ namespace LibIRD HashFiles(fs, reader, rootDir); if (FileCount != fileCount) { - Console.WriteLine($"{isoPath} contains splits files: detected {FileCount} out of {fileCount} expected files"); + Console.WriteLine($"{isoPath} contains split files: detected {FileCount} out of {fileCount} expected files"); long[] tempFileKeys = FileKeys; Array.Resize(ref tempFileKeys, (int)FileCount); FileKeys = tempFileKeys; diff --git a/LibIRD/LibIRD.csproj b/LibIRD/LibIRD.csproj index 14136cb..37430ff 100644 --- a/LibIRD/LibIRD.csproj +++ b/LibIRD/LibIRD.csproj @@ -6,7 +6,7 @@ win-x86;win-x64;win-arm64;linux-x64;linux-arm64;osx-x64;osx-arm64 latest true - 0.3.2 + 0.3.3 Deterous