diff options
author | sr55 <[email protected]> | 2011-03-24 21:40:17 +0000 |
---|---|---|
committer | sr55 <[email protected]> | 2011-03-24 21:40:17 +0000 |
commit | 42d3b4ab3f9e1efe98ad96eafcb8b39a75732924 (patch) | |
tree | 276d985d6e27f15c8b504eb493765273988e586b /win/CS | |
parent | b2b7423cbd647bae6fc7cccd1d39d6c06d6db88e (diff) |
WinGui: Fix for "{source_path}" option.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3877 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/CS')
-rw-r--r-- | win/CS/Functions/Main.cs | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/win/CS/Functions/Main.cs b/win/CS/Functions/Main.cs index ae53efe90..33491ed96 100644 --- a/win/CS/Functions/Main.cs +++ b/win/CS/Functions/Main.cs @@ -244,20 +244,20 @@ namespace Handbrake.Functions destinationFilename += ".mkv";
// Now work out the path where the file will be stored.
- // First case: If the destination box doesn't already contain a path, make one.
- if (!mainWindow.text_destination.Text.Contains(Path.DirectorySeparatorChar.ToString()))
+ // If there is an auto name path, use it...
+ if (Properties.Settings.Default.autoNamePath.Trim() == "{source_path}" && !string.IsNullOrEmpty(mainWindow.sourcePath))
{
- // If there is an auto name path, use it...
- if (Properties.Settings.Default.autoNamePath.Trim() == "{source_path}" && !string.IsNullOrEmpty(mainWindow.sourcePath))
+ autoNamePath = Path.Combine(Path.GetDirectoryName(mainWindow.sourcePath), destinationFilename);
+ if (autoNamePath == mainWindow.sourcePath)
{
- autoNamePath = Path.Combine(Path.GetDirectoryName(mainWindow.sourcePath), destinationFilename);
- if (autoNamePath == mainWindow.sourcePath)
- {
- // Append out_ to files that already exist or is the source file
- autoNamePath = Path.Combine(Path.GetDirectoryName(mainWindow.sourcePath), "output_" + destinationFilename);
- }
+ // Append out_ to files that already exist or is the source file
+ autoNamePath = Path.Combine(Path.GetDirectoryName(mainWindow.sourcePath), "output_" + destinationFilename);
}
- else if (Properties.Settings.Default.autoNamePath.Trim() != string.Empty && Properties.Settings.Default.autoNamePath.Trim() != "Click 'Browse' to set the default location")
+ }
+ // Second case: If the destination box doesn't already contain a path, make one.
+ else if (!mainWindow.text_destination.Text.Contains(Path.DirectorySeparatorChar.ToString()))
+ {
+ if (Properties.Settings.Default.autoNamePath.Trim() != string.Empty && Properties.Settings.Default.autoNamePath.Trim() != "Click 'Browse' to set the default location")
{
autoNamePath = Path.Combine(Properties.Settings.Default.autoNamePath, destinationFilename);
}
|