diff options
Diffstat (limited to 'win/CS/HandBrakeWPF/Converters/FullPathToFileNameConverter.cs')
-rw-r--r-- | win/CS/HandBrakeWPF/Converters/FullPathToFileNameConverter.cs | 5 |
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";
|