summaryrefslogtreecommitdiffstats
path: root/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs
diff options
context:
space:
mode:
authorsr55 <[email protected]>2017-01-14 21:52:18 +0000
committersr55 <[email protected]>2017-01-14 21:52:18 +0000
commita9b099a4dda21b98fc9f2a5257298563ab52a55e (patch)
treebce155e657e069e99b3bcb1107e02ccb1695b5a9 /win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs
parent37c850933585d8413e47142a197e642bd746c02a (diff)
WinGui: Fix erroneous path and filename handling. #515
Diffstat (limited to 'win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs')
-rw-r--r--win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs12
1 files changed, 7 insertions, 5 deletions
diff --git a/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs
index 4dab47e0d..3454a5cbb 100644
--- a/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs
+++ b/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs
@@ -709,14 +709,16 @@ namespace HandBrakeWPF.ViewModels
try
{
ext = Path.GetExtension(value);
+ if (FileHelper.FilePathHasInvalidChars(value) || string.IsNullOrEmpty(ext))
+ {
+ this.errorService.ShowMessageBox(Resources.Main_InvalidDestination, Resources.Error, MessageBoxButton.OK, MessageBoxImage.Error);
+ return;
+ }
}
catch (ArgumentException)
{
- this.errorService.ShowMessageBox(
- Resources.Main_InvalidDestination,
- Resources.Error,
- MessageBoxButton.OK,
- MessageBoxImage.Error);
+ this.errorService.ShowMessageBox(Resources.Main_InvalidDestination, Resources.Error, MessageBoxButton.OK, MessageBoxImage.Error);
+ return;
}
this.CurrentTask.Destination = value;