summaryrefslogtreecommitdiffstats
path: root/win/CS/Functions
diff options
context:
space:
mode:
authorsr55 <[email protected]>2011-10-15 14:18:56 +0000
committersr55 <[email protected]>2011-10-15 14:18:56 +0000
commit12666937e2d7aba0f1d9c0a9a9741dc2afb2ab3b (patch)
tree431c57836dda140bfb196840611d8857f9940198 /win/CS/Functions
parentf9bacce5f7bf435724131b8ece2b14b0c3d82240 (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/Functions')
-rw-r--r--win/CS/Functions/Main.cs3
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))