diff options
author | sr55 <[email protected]> | 2017-01-14 21:52:18 +0000 |
---|---|---|
committer | sr55 <[email protected]> | 2017-01-14 21:52:18 +0000 |
commit | a9b099a4dda21b98fc9f2a5257298563ab52a55e (patch) | |
tree | bce155e657e069e99b3bcb1107e02ccb1695b5a9 /win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs | |
parent | 37c850933585d8413e47142a197e642bd746c02a (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.cs | 12 |
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;
|