From 3be4378b61b2ffd00554850292c7e5044dc07908 Mon Sep 17 00:00:00 2001 From: Matt Nadareski Date: Wed, 30 Apr 2025 08:53:20 -0400 Subject: [PATCH] Normalize file path in CLI (fixes #826) --- CHANGELIST.md | 1 + MPF.CLI/Program.cs | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/CHANGELIST.md b/CHANGELIST.md index 6962ec71..5ce07d50 100644 --- a/CHANGELIST.md +++ b/CHANGELIST.md @@ -3,6 +3,7 @@ - Fix typo for L1Toolstamp!.Label (bikerspade) - Update redumper to build 549 - Allow max speed dumping ("0") +- Normalize file path in CLI ### 3.3.0 (2025-01-03) diff --git a/MPF.CLI/Program.cs b/MPF.CLI/Program.cs index f47fc196..82d943fd 100644 --- a/MPF.CLI/Program.cs +++ b/MPF.CLI/Program.cs @@ -104,6 +104,10 @@ namespace MPF.CLI return; } + // Normalize the file path + if (opts.FilePath != null) + opts.FilePath = Path.GetFullPath(opts.FilePath); + // Get the speed from the options int speed = opts.DriveSpeed ?? FrontendTool.GetDefaultSpeedForMediaType(mediaType, options);