diff options
author | sr55 <[email protected]> | 2018-12-16 10:30:52 +0000 |
---|---|---|
committer | sr55 <[email protected]> | 2018-12-16 10:30:52 +0000 |
commit | d2ab2122b26cd97961887ae1228692ade5e647f7 (patch) | |
tree | b6ce165ea9ed9c2c20e34417424e3f1c285046fa /win | |
parent | 88b0c6e75e0200bba533260eab7cd832ed846659 (diff) |
WinGui: Fix an error when trying to encode an item with no destination.
Diffstat (limited to 'win')
-rw-r--r-- | win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs index 367318080..0aa0cdd59 100644 --- a/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs +++ b/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs @@ -1534,6 +1534,15 @@ namespace HandBrakeWPF.ViewModels return false;
}
+
+ if (!DriveUtilities.HasMinimumDiskSpace(
+ this.Destination,
+ this.userSettingService.GetUserSetting<long>(UserSettingConstants.PauseOnLowDiskspaceLevel)))
+ {
+ this.errorService.ShowMessageBox(Resources.Main_LowDiskspace, Resources.Error, MessageBoxButton.OK, MessageBoxImage.Error);
+ return false;
+ }
+
// Sanity check the filename
if (!string.IsNullOrEmpty(this.Destination) && FileHelper.FilePathHasInvalidChars(this.Destination))
{
@@ -1740,14 +1749,6 @@ namespace HandBrakeWPF.ViewModels return;
}
- if (!DriveUtilities.HasMinimumDiskSpace(
- this.Destination,
- this.userSettingService.GetUserSetting<long>(UserSettingConstants.PauseOnLowDiskspaceLevel)))
- {
- this.errorService.ShowMessageBox(Resources.Main_LowDiskspace, Resources.Error, MessageBoxButton.OK, MessageBoxImage.Error);
- return;
- }
-
// Create the Queue Task and Start Processing
if (this.AddToQueue())
{
|