From: sr55 Date: Sat, 10 Mar 2012 16:14:45 +0000 (+0000) Subject: WinGui: (0.9.x) Fix an issue with Autonaming destination file with multi-dot extensions X-Git-Tag: 0.9.6.1~61 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=77b69d694061452e1ae6f017f79e49519bf145cc;p=handbrake WinGui: (0.9.x) Fix an issue with Autonaming destination file with multi-dot extensions git-svn-id: svn://svn.handbrake.fr/HandBrake/branches/0.9.x@4501 b64f7644-9d1e-0410-96f1-a4d463321fa5 --- diff --git a/win/CS/Functions/Main.cs b/win/CS/Functions/Main.cs index 42b103498..709f43ae9 100644 --- a/win/CS/Functions/Main.cs +++ b/win/CS/Functions/Main.cs @@ -179,7 +179,6 @@ namespace Handbrake.Functions { // Get the Source Name and remove any invalid characters string sourceName = Path.GetInvalidFileNameChars().Aggregate(mainWindow.SourceName, (current, character) => current.Replace(character.ToString(), string.Empty)); - sourceName = Path.GetFileNameWithoutExtension(sourceName); // Remove Underscores if (UserSettingService.GetUserSetting(UserSettingConstants.AutoNameRemoveUnderscore)) diff --git a/win/CS/frmMain.cs b/win/CS/frmMain.cs index 475b42019..a142b5d76 100644 --- a/win/CS/frmMain.cs +++ b/win/CS/frmMain.cs @@ -98,7 +98,7 @@ namespace Handbrake if (selectedTitle != null && !string.IsNullOrEmpty(selectedTitle.SourceName)) { - return Path.GetFileName(selectedTitle.SourceName); + return Path.GetFileNameWithoutExtension(selectedTitle.SourceName); } // We have a drive, selected as a folder.