summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--win/C#/Functions/Main.cs3
1 files changed, 2 insertions, 1 deletions
diff --git a/win/C#/Functions/Main.cs b/win/C#/Functions/Main.cs
index d061f67d8..18919fee8 100644
--- a/win/C#/Functions/Main.cs
+++ b/win/C#/Functions/Main.cs
@@ -204,7 +204,8 @@ namespace Handbrake.Functions
if (mainWindow.drp_dvdtitle.Text != "Automatic")
{
// Get the Source Name and remove any invalid characters
- string sourceName = Path.GetInvalidFileNameChars().Aggregate(mainWindow.SourceName, (current, character) => current.Replace(character.ToString(), string.Empty));
+
+ string sourceName = Path.GetInvalidFileNameChars().Aggregate(Path.GetFileNameWithoutExtension(mainWindow.SourceName), (current, character) => current.Replace(character.ToString(), string.Empty));
if (Properties.Settings.Default.AutoNameRemoveUnderscore)
sourceName = sourceName.Replace("_", " ");