Use and trim quotes for Redumper

This commit is contained in:
Matt Nadareski
2023-03-10 14:13:36 -05:00
parent 100e012fe6
commit 987348fee8
2 changed files with 5 additions and 4 deletions

View File

@@ -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)

View File

@@ -27,7 +27,7 @@ namespace MPF.Modules.Redumper
public override string InputPath => DriveValue;
/// <inheritdoc/>
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);
/// <inheritdoc/>
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}\"";
}
}