From 1476972c264bf8b96b5a91dddbb07b78cb650ab9 Mon Sep 17 00:00:00 2001 From: Matt Nadareski Date: Sun, 4 May 2025 11:14:46 -0400 Subject: [PATCH] Pre-clean file path in CLI interactive mode --- CHANGELIST.md | 1 + MPF.CLI/Program.cs | 7 ++++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGELIST.md b/CHANGELIST.md index 85325ded..cac17210 100644 --- a/CHANGELIST.md +++ b/CHANGELIST.md @@ -38,6 +38,7 @@ - Normalize Shift-JIS characters, when possible - Update to DIC 20250501 - Update RedumpLib to 1.6.6 +- Pre-clean file path in CLI interactive mode ### 3.3.0 (2025-01-03) diff --git a/MPF.CLI/Program.cs b/MPF.CLI/Program.cs index 9ac3f95a..d2eaebdc 100644 --- a/MPF.CLI/Program.cs +++ b/MPF.CLI/Program.cs @@ -333,7 +333,12 @@ namespace MPF.CLI Console.WriteLine(); Console.WriteLine("Input the file path and press Enter:"); Console.Write("> "); - opts.FilePath = Console.ReadLine(); + + result = Console.ReadLine(); + if (result.Length > 0) + result = Path.GetFullPath(result); + + opts.FilePath = result; goto root; overrideSpeed: