mirror of
https://github.com/SabreTools/MPF.git
synced 2026-07-02 17:24:48 +00:00
Save path fixing until the very end (fixes #176)
This commit is contained in:
@@ -242,7 +242,8 @@ namespace DICUI.Utilities
|
||||
try
|
||||
{
|
||||
// Cache if we had a directory separator or not
|
||||
bool endedWithDirectorySeparator = OutputDirectory.EndsWith(Path.DirectorySeparatorChar.ToString());
|
||||
bool endedWithDirectorySeparator = OutputDirectory.EndsWith(Path.DirectorySeparatorChar.ToString())
|
||||
|| OutputDirectory.EndsWith(Path.AltDirectorySeparatorChar.ToString());
|
||||
bool endedWithSpace = OutputDirectory.EndsWith(" ");
|
||||
|
||||
// Combine the path to make things separate easier
|
||||
@@ -372,10 +373,9 @@ namespace DICUI.Utilities
|
||||
if (Drive == null)
|
||||
return null;
|
||||
|
||||
FixOutputPaths();
|
||||
|
||||
// Set the proper parameters
|
||||
DICParameters = new Parameters(System, Type, Drive.Letter, Path.Combine(OutputDirectory, OutputFilename), driveSpeed, ParanoidMode, RereadAmountC2);
|
||||
string filename = OutputDirectory + Path.DirectorySeparatorChar + OutputFilename;
|
||||
DICParameters = new Parameters(System, Type, Drive.Letter, filename, driveSpeed, ParanoidMode, RereadAmountC2);
|
||||
if (QuietMode)
|
||||
DICParameters[DICFlag.DisableBeep] = true;
|
||||
|
||||
|
||||
@@ -3,7 +3,6 @@ using System.Collections.Generic;
|
||||
using System.Drawing;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using WinForms = System.Windows.Forms;
|
||||
@@ -427,9 +426,6 @@ namespace DICUI.Windows
|
||||
Type = MediaTypeComboBox.SelectedItem as MediaType?,
|
||||
};
|
||||
|
||||
// Fix the output paths
|
||||
env.FixOutputPaths();
|
||||
|
||||
// Disable automatic reprocessing of the textboxes until we're done
|
||||
OutputDirectoryTextBox.TextChanged -= OutputDirectoryTextBoxTextChanged;
|
||||
OutputFilenameTextBox.TextChanged -= OutputFilenameTextBoxTextChanged;
|
||||
@@ -466,6 +462,9 @@ namespace DICUI.Windows
|
||||
// If "No", then we continue with the current known environment
|
||||
}
|
||||
|
||||
// Fix the output paths
|
||||
_env.FixOutputPaths();
|
||||
|
||||
try
|
||||
{
|
||||
// Check for the firmware first
|
||||
|
||||
Reference in New Issue
Block a user