@@ -172,14 +172,9 @@ private async Task<List<Result>> PathSearchAsync(Query query, CancellationToken
172
172
173
173
var retrievedDirectoryPath = FilesFolders . ReturnPreviousDirectoryIfIncompleteString ( locationPath ) ;
174
174
175
- if ( retrievedDirectoryPath . EndsWith ( ":\\ " ) )
176
- {
177
- results . Add ( ResultManager . CreateDriveSpaceDisplayResult ( retrievedDirectoryPath , useIndexSearch ) ) ;
178
- }
179
- else
180
- {
181
- results . Add ( ResultManager . CreateOpenCurrentFolderResult ( retrievedDirectoryPath , useIndexSearch ) ) ;
182
- }
175
+ results . Add ( retrievedDirectoryPath . EndsWith ( ":\\ " )
176
+ ? ResultManager . CreateDriveSpaceDisplayResult ( retrievedDirectoryPath , useIndexSearch )
177
+ : ResultManager . CreateOpenCurrentFolderResult ( retrievedDirectoryPath , useIndexSearch ) ) ;
183
178
184
179
if ( token . IsCancellationRequested )
185
180
return new List < Result > ( ) ;
@@ -188,7 +183,7 @@ private async Task<List<Result>> PathSearchAsync(Query query, CancellationToken
188
183
189
184
var recursiveIndicatorIndex = query . Search . IndexOf ( '>' ) ;
190
185
191
- if ( recursiveIndicatorIndex > 0 && Settings . PathEnumerationEngine != Settings . PathEnumerationEngineOption . Direct )
186
+ if ( recursiveIndicatorIndex > 0 && Settings . PathEnumerationEngine != Settings . PathEnumerationEngineOption . DirectEnumeration )
192
187
{
193
188
directoryResult =
194
189
await Settings . PathEnumerator . EnumerateAsync (
@@ -228,15 +223,9 @@ private bool UseWindowsIndexForDirectorySearch(string locationPath)
228
223
{
229
224
var pathToDirectory = FilesFolders . ReturnPreviousDirectoryIfIncompleteString ( locationPath ) ;
230
225
231
- if ( ! Settings . UseWindowsIndexForDirectorySearch )
232
- return false ;
233
-
234
- if ( Settings . IndexSearchExcludedSubdirectoryPaths
235
- . Any ( x => FilesFolders . ReturnPreviousDirectoryIfIncompleteString ( pathToDirectory )
236
- . StartsWith ( x . Path , StringComparison . OrdinalIgnoreCase ) ) )
237
- return false ;
238
-
239
- return WindowsIndex . WindowsIndex . PathIsIndexed ( pathToDirectory ) ;
226
+ return ! Settings . IndexSearchExcludedSubdirectoryPaths . Any (
227
+ x => FilesFolders . ReturnPreviousDirectoryIfIncompleteString ( pathToDirectory ) . StartsWith ( x . Path , StringComparison . OrdinalIgnoreCase ) )
228
+ && WindowsIndex . WindowsIndex . PathIsIndexed ( pathToDirectory ) ;
240
229
}
241
230
}
242
231
}
0 commit comments