@@ -21,7 +21,8 @@ internal static List<Result> TopLevelDirectorySearch(Query query, string search,
21
21
RecurseSubdirectories = true
22
22
} , query , search , criteria , token ) ;
23
23
24
- return DirectorySearch ( new EnumerationOptions ( ) , query , search , criteria , token ) ; // null will be passed as default
24
+ return DirectorySearch ( new EnumerationOptions ( ) , query , search , criteria ,
25
+ token ) ; // null will be passed as default
25
26
}
26
27
27
28
public static string ConstructSearchCriteria ( string search )
@@ -57,7 +58,8 @@ private static List<Result> DirectorySearch(EnumerationOptions enumerationOption
57
58
{
58
59
var directoryInfo = new System . IO . DirectoryInfo ( path ) ;
59
60
60
- foreach ( var fileSystemInfo in directoryInfo . EnumerateFileSystemInfos ( searchCriteria , enumerationOption ) )
61
+ foreach ( var fileSystemInfo in directoryInfo . EnumerateFileSystemInfos ( searchCriteria , enumerationOption )
62
+ )
61
63
{
62
64
if ( fileSystemInfo is System . IO . DirectoryInfo )
63
65
{
@@ -74,17 +76,10 @@ private static List<Result> DirectorySearch(EnumerationOptions enumerationOption
74
76
}
75
77
catch ( Exception e )
76
78
{
77
- if ( ! ( e is ArgumentException ) )
78
- throw e ;
79
-
79
+ Log . Exception ( "Flow.Plugin.Explorer." , nameof ( DirectoryInfoSearch ) , e ) ;
80
80
results . Add ( new Result { Title = e . Message , Score = 501 } ) ;
81
81
82
82
return results ;
83
-
84
- #if DEBUG // Please investigate and handle error from DirectoryInfo search
85
- #else
86
- Log . Exception ( $ "|Flow.Launcher.Plugin.Explorer.DirectoryInfoSearch|Error from performing DirectoryInfoSearch", e ) ;
87
- #endif
88
83
}
89
84
90
85
// Initial ordering, this order can be updated later by UpdateResultView.MainViewModel based on history of user selection.
0 commit comments