mirror of
https://github.com/SabreTools/MPF.git
synced 2026-07-02 17:24:48 +00:00
Streamline output path textbox handling
Addresses issue of cursor moving during typing Addresses issue of extraneous spaces appearing
This commit is contained in:
@@ -246,7 +246,6 @@ namespace MPF.Data
|
||||
// Cache if we had a directory separator or not
|
||||
bool endedWithDirectorySeparator = directory.EndsWith(Path.DirectorySeparatorChar.ToString())
|
||||
|| directory.EndsWith(Path.AltDirectorySeparatorChar.ToString());
|
||||
bool endedWithSpace = directory.EndsWith(" ");
|
||||
|
||||
// Combine the path to make things separate easier
|
||||
string combinedPath = Path.Combine(directory, filename);
|
||||
@@ -271,10 +270,6 @@ namespace MPF.Data
|
||||
if (replacePeriods)
|
||||
filename = Path.GetFileNameWithoutExtension(filename).Replace('.', '_') + "." + Path.GetExtension(filename).TrimStart('.');
|
||||
|
||||
// If we had a space at the end before, add it again
|
||||
if (endedWithSpace)
|
||||
directory += " ";
|
||||
|
||||
// If we had a directory separator at the end before, add it again
|
||||
if (endedWithDirectorySeparator)
|
||||
directory += Path.DirectorySeparatorChar;
|
||||
|
||||
Reference in New Issue
Block a user