summaryrefslogtreecommitdiffstats
path: root/win/CS/HandBrakeWPF/Converters/FullPathToFileNameConverter.cs
diff options
context:
space:
mode:
authorsr55 <[email protected]>2012-03-01 19:01:54 +0000
committersr55 <[email protected]>2012-03-01 19:01:54 +0000
commit2efd8f264113bcd3d8c39a1f408c16cc27100aa7 (patch)
treeaedb1cc0017839a91bdc80c46819332b76a975f9 /win/CS/HandBrakeWPF/Converters/FullPathToFileNameConverter.cs
parent5bb4078641106578dd0a8e1eab6e1cfbc814067e (diff)
WinGui: (WPF) Further work wiring up the new UI.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4479 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/CS/HandBrakeWPF/Converters/FullPathToFileNameConverter.cs')
-rw-r--r--win/CS/HandBrakeWPF/Converters/FullPathToFileNameConverter.cs5
1 files changed, 3 insertions, 2 deletions
diff --git a/win/CS/HandBrakeWPF/Converters/FullPathToFileNameConverter.cs b/win/CS/HandBrakeWPF/Converters/FullPathToFileNameConverter.cs
index b0f764ba8..fa659d232 100644
--- a/win/CS/HandBrakeWPF/Converters/FullPathToFileNameConverter.cs
+++ b/win/CS/HandBrakeWPF/Converters/FullPathToFileNameConverter.cs
@@ -39,9 +39,10 @@ namespace HandBrakeWPF.Converters
/// </returns>
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
{
- if (!string.IsNullOrEmpty(value.ToString()))
+ string path = value as string;
+ if (!string.IsNullOrEmpty(path) && ! path.EndsWith("\\"))
{
- return Path.GetFileName(value.ToString());
+ return Path.GetFileName(path);
}
return "Unknown";