Skip to content

Commit 83fa485

Browse files
committed
Add default subfolder to CLI outputs
1 parent ecc00a2 commit 83fa485

File tree

3 files changed

+9
-2
lines changed

3 files changed

+9
-2
lines changed

CHANGELIST.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
- Update Redumper to build 676 (rename asus flags to mediatek)
77
- Use default media type if not provided
88
- Update Redumper to build 682 (Dreamcast support)
9+
- Add default subfolder to CLI outputs
910

1011
### 3.6.0 (2025-11-28)
1112

MPF.CLI/Features/BaseFeature.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,8 @@ public override bool Execute()
174174
// Normalize the file path
175175
if (DevicePath != null && FilePath == null)
176176
{
177-
FilePath = $"track_{DateTime.Now:yyyyMMdd-HHmm}.bin";
177+
string defaultFileName = $"track_{DateTime.Now:yyyyMMdd-HHmm}";
178+
FilePath = Path.Combine(defaultFileName, $"{defaultFileName}.bin");
178179
if (Options.DefaultOutputPath != null)
179180
FilePath = Path.Combine(Options.DefaultOutputPath, FilePath);
180181
}

MPF.CLI/Features/InteractiveFeature.cs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,12 @@ public override bool ProcessArgs(string[] args, int index)
3838

3939
// Create return values
4040
MediaType = SabreTools.RedumpLib.Data.MediaType.NONE;
41-
FilePath = Path.Combine(Options.DefaultOutputPath ?? "ISO", $"track_{DateTime.Now:yyyyMMdd-HHmm}.bin");
41+
string defaultFileName = $"track_{DateTime.Now:yyyyMMdd-HHmm}";
42+
#if NET20 || NET35
43+
FilePath = Path.Combine(Options.DefaultOutputPath ?? "ISO", Path.Combine(defaultFileName, $"{defaultFileName}.bin"));
44+
#else
45+
FilePath = Path.Combine(Options.DefaultOutputPath ?? "ISO", defaultFileName, $"{defaultFileName}.bin");
46+
#endif
4247
System = Options.DefaultSystem;
4348

4449
// Create state values

0 commit comments

Comments
 (0)