]> granicus.if.org Git - handbrake/commitdiff
WinGui: Adding some additional validation to the destination box.
authorsr55 <sr55.hb@outlook.com>
Fri, 25 Jan 2019 20:35:43 +0000 (20:35 +0000)
committersr55 <sr55.hb@outlook.com>
Sun, 27 Jan 2019 20:46:41 +0000 (20:46 +0000)
win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs

index fbb241ea2d8f87ec126c69fe2125b85ef78ccb14..9d07343a76be7ca7cf2c4e5e48d80d182fcd1651 100644 (file)
@@ -582,6 +582,13 @@ namespace HandBrakeWPF.ViewModels
                                 this.errorService.ShowMessageBox(Resources.Main_InvalidDestination, Resources.Error, MessageBoxButton.OK, MessageBoxImage.Error);\r
                                 return;\r
                             }\r
+\r
+                            if (value == this.ScannedSource.ScanPath)\r
+                            {\r
+                                this.Destination = null;\r
+                                this.errorService.ShowMessageBox(Resources.Main_SourceDestinationMatchError, Resources.Error, MessageBoxButton.OK, MessageBoxImage.Error);\r
+                                return;\r
+                            }\r
                         }\r
                         catch (Exception exc)\r
                         {\r