diff options
author | sr55 <[email protected]> | 2009-09-09 08:10:17 +0000 |
---|---|---|
committer | sr55 <[email protected]> | 2009-09-09 08:10:17 +0000 |
commit | c46fb4570f1852083a83960de0124145ab0aa85a (patch) | |
tree | dad26872d152fccf1728f4bb91350b5a86d52a65 /win/C#/Functions | |
parent | 5552e4ba9041e0a810fb63dd175a62de48826906 (diff) |
WinGui:
- Improve autoName reliability - Thanks exdeus
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2809 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/C#/Functions')
-rw-r--r-- | win/C#/Functions/Main.cs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/win/C#/Functions/Main.cs b/win/C#/Functions/Main.cs index 7516e52da..022a025ba 100644 --- a/win/C#/Functions/Main.cs +++ b/win/C#/Functions/Main.cs @@ -124,7 +124,7 @@ namespace Handbrake.Functions /// Function which generates the filename and path automatically based on
/// the Source Name, DVD title and DVD Chapters
/// </summary>
- public static string autoName(frmMain mainWindow ) //ComboBox drpDvdtitle, string chapter_start, string chatper_end, string source, string dest, int format, Boolean chapters)
+ public static string autoName(frmMain mainWindow) //ComboBox drpDvdtitle, string chapter_start, string chatper_end, string source, string dest, int format, Boolean chapters)
{
string AutoNamePath = string.Empty;
if (mainWindow.drp_dvdtitle.Text != "Automatic")
@@ -178,7 +178,9 @@ namespace Handbrake.Functions {
// Use the path and change the file extension to match the previous destination
AutoNamePath = Path.Combine(Path.GetDirectoryName(mainWindow.text_destination.Text), destinationFilename);
- AutoNamePath = Path.ChangeExtension(AutoNamePath, Path.GetExtension(mainWindow.text_destination.Text));
+
+ if (Path.HasExtension(mainWindow.text_destination.Text))
+ AutoNamePath = Path.ChangeExtension(AutoNamePath, Path.GetExtension(mainWindow.text_destination.Text));
}
}
|