From 987348fee85fb053d595cd755dd25c1172de594a Mon Sep 17 00:00:00 2001 From: Matt Nadareski Date: Fri, 10 Mar 2023 14:13:36 -0500 Subject: [PATCH] Use and trim quotes for Redumper --- CHANGELIST.md | 1 + MPF.Modules/Redumper/Parameters.cs | 8 ++++---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/CHANGELIST.md b/CHANGELIST.md index 0b80152e..e40a2820 100644 --- a/CHANGELIST.md +++ b/CHANGELIST.md @@ -87,6 +87,7 @@ - Fix errant forward slashes - Add TOC back as optional file - Fix Redumper path generation +- Use and trim quotes for Redumper ### 2.4 (2022-10-26) diff --git a/MPF.Modules/Redumper/Parameters.cs b/MPF.Modules/Redumper/Parameters.cs index 60064e2b..85f39e65 100644 --- a/MPF.Modules/Redumper/Parameters.cs +++ b/MPF.Modules/Redumper/Parameters.cs @@ -27,7 +27,7 @@ namespace MPF.Modules.Redumper public override string InputPath => DriveValue; /// - public override string OutputPath => Path.Combine(ImagePathValue ?? string.Empty, ImageNameValue ?? string.Empty); + public override string OutputPath => Path.Combine(ImagePathValue?.Trim('"') ?? string.Empty, ImageNameValue?.Trim('"') ?? string.Empty); /// public override int? Speed => SpeedValue; @@ -649,14 +649,14 @@ namespace MPF.Modules.Redumper if (!string.IsNullOrWhiteSpace(imagePath)) { this[FlagStrings.ImagePath] = true; - ImagePathValue = imagePath; + ImagePathValue = $"\"{imagePath}\""; } - string imageName = Path.GetFileName(filename); + string imageName = Path.GetFileNameWithoutExtension(filename); if (!string.IsNullOrWhiteSpace(imageName)) { this[FlagStrings.ImageName] = true; - ImageNameValue = imageName; + ImageNameValue = $"\"{imageName}\""; } }