summaryrefslogtreecommitdiffstats
path: root/win
diff options
context:
space:
mode:
authorsr55 <[email protected]>2019-04-25 15:49:24 +0100
committersr55 <[email protected]>2019-04-25 15:49:24 +0100
commit7d4f1bb45ecba4ce2092bedf915dcd5761888d17 (patch)
tree12428309846bf751bb05246b3bb317eb98f2bb29 /win
parentb2253ebf5320f0bd5f0743300a5ec82b91b67c6d (diff)
WinGui: Fix Autoname directory selection
Diffstat (limited to 'win')
-rw-r--r--win/CS/HandBrakeWPF/Helpers/AutoNameHelper.cs8
1 files changed, 3 insertions, 5 deletions
diff --git a/win/CS/HandBrakeWPF/Helpers/AutoNameHelper.cs b/win/CS/HandBrakeWPF/Helpers/AutoNameHelper.cs
index cf21aae0a..bcd249798 100644
--- a/win/CS/HandBrakeWPF/Helpers/AutoNameHelper.cs
+++ b/win/CS/HandBrakeWPF/Helpers/AutoNameHelper.cs
@@ -231,8 +231,6 @@ namespace HandBrakeWPF.Helpers
}
autoNamePath = CheckAndHandleFilenameCollisions(autoNamePath, destinationFilename, task, userSettingService);
-
-
}
return autoNamePath;
@@ -280,14 +278,14 @@ namespace HandBrakeWPF.Helpers
{
if (autoNamePath?.ToLower() == task.Source?.ToLower())
{
- autoNamePath = Path.Combine(Path.GetDirectoryName(task.Source), prefix + filenameWithoutExt + postfix + extension);
+ autoNamePath = Path.Combine(Path.GetDirectoryName(autoNamePath), prefix + filenameWithoutExt + postfix + extension);
int counter = 0;
while (File.Exists(autoNamePath))
{
counter = counter + 1;
string appendedNumber = string.Format("({0})", counter);
- autoNamePath = Path.Combine(Path.GetDirectoryName(task.Source), prefix + filenameWithoutExt + postfix + appendedNumber + extension);
+ autoNamePath = Path.Combine(Path.GetDirectoryName(autoNamePath), prefix + filenameWithoutExt + postfix + appendedNumber + extension);
}
}
}
@@ -298,7 +296,7 @@ namespace HandBrakeWPF.Helpers
{
counter = counter + 1;
string appendedNumber = string.Format("({0})", counter);
- autoNamePath = Path.Combine(Path.GetDirectoryName(task.Source), filenameWithoutExt + appendedNumber + extension);
+ autoNamePath = Path.Combine(Path.GetDirectoryName(autoNamePath), filenameWithoutExt + appendedNumber + extension);
}
}