File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -31,11 +31,7 @@ public Models.ApplyWhiteSpaceMode SelectedWhiteSpaceMode
3131 public bool FromClipboard
3232 {
3333 get => _fromClipboard ;
34- set
35- {
36- if ( SetProperty ( ref _fromClipboard , value ) )
37- ValidateProperty ( _patchFile , nameof ( PatchFile ) ) ;
38- }
34+ set => SetProperty ( ref _fromClipboard , value ) ;
3935 }
4036
4137 public bool ThreeWayMerge
@@ -61,10 +57,16 @@ public static ValidationResult ValidatePatchFile(string file, ValidationContext
6157 if ( ctx . ObjectInstance is not Apply apply )
6258 return new ValidationResult ( "Invalid object instance!!!" ) ;
6359
64- if ( apply . FromClipboard || File . Exists ( file ) )
60+ if ( apply . FromClipboard )
6561 return ValidationResult . Success ;
6662
67- return new ValidationResult ( $ "File '{ file } ' can NOT be found!!!") ;
63+ if ( string . IsNullOrEmpty ( file ) )
64+ return new ValidationResult ( "Please select a patch file!!!" ) ;
65+
66+ if ( ! File . Exists ( file ) )
67+ return new ValidationResult ( $ "File '{ file } ' can NOT be found!!!") ;
68+
69+ return ValidationResult . Success ;
6870 }
6971
7072 public override async Task < bool > Sure ( )
You can’t perform that action at this time.
0 commit comments