summaryrefslogtreecommitdiffstats
path: root/win/C#/Functions
diff options
context:
space:
mode:
Diffstat (limited to 'win/C#/Functions')
-rw-r--r--win/C#/Functions/Main.cs6
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));
}
}