diff options
author | sr55 <[email protected]> | 2011-10-15 14:18:56 +0000 |
---|---|---|
committer | sr55 <[email protected]> | 2011-10-15 14:18:56 +0000 |
commit | 12666937e2d7aba0f1d9c0a9a9741dc2afb2ab3b (patch) | |
tree | 431c57836dda140bfb196840611d8857f9940198 /win/CS | |
parent | f9bacce5f7bf435724131b8ece2b14b0c3d82240 (diff) |
WinGui: Fix a bug in the AutoName function when the source name has invalid characters for a file path.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4288 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/CS')
-rw-r--r-- | win/CS/Functions/Main.cs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/win/CS/Functions/Main.cs b/win/CS/Functions/Main.cs index 8d88871c2..728747864 100644 --- a/win/CS/Functions/Main.cs +++ b/win/CS/Functions/Main.cs @@ -176,7 +176,8 @@ namespace Handbrake.Functions if (mainWindow.drp_dvdtitle.Text != "Automatic")
{
// Get the Source Name and remove any invalid characters
- string sourceName = Path.GetInvalidFileNameChars().Aggregate(Path.GetFileNameWithoutExtension(mainWindow.SourceName), (current, character) => current.Replace(character.ToString(), string.Empty));
+ string sourceName = Path.GetInvalidFileNameChars().Aggregate(mainWindow.SourceName, (current, character) => current.Replace(character.ToString(), string.Empty));
+ sourceName = Path.GetFileNameWithoutExtension(sourceName);
// Remove Underscores
if (UserSettingService.GetUserSetting<bool>(UserSettingConstants.AutoNameRemoveUnderscore))
|