@@ -42,29 +42,38 @@ private async ValueTask ThrowIfEverythingNotAvailableAsync(CancellationToken tok
4242 private async ValueTask < bool > ClickToInstallEverythingAsync ( ActionContext _ )
4343 {
4444 var installedPath = await EverythingDownloadHelper . PromptDownloadIfNotInstallAsync ( Settings . EverythingInstalledPath , Main . Context . API ) ;
45+
4546 if ( installedPath == null )
4647 {
4748 Main . Context . API . ShowMsgError ( "Unable to find Everything.exe" ) ;
49+
4850 return false ;
4951 }
52+
5053 Settings . EverythingInstalledPath = installedPath ;
5154 Process . Start ( installedPath , "-startup" ) ;
55+
5256 return true ;
5357 }
5458
5559 public async IAsyncEnumerable < SearchResult > SearchAsync ( string search , [ EnumeratorCancellation ] CancellationToken token )
5660 {
5761 await ThrowIfEverythingNotAvailableAsync ( token ) ;
62+
5863 if ( token . IsCancellationRequested )
5964 yield break ;
60- var option = new EverythingSearchOption ( search , Settings . SortOption ) ;
65+
66+ var option = new EverythingSearchOption ( search , Settings . SortOption , IsFullPathSearch : Settings . EverythingSearchFullPath ) ;
67+
6168 await foreach ( var result in EverythingApi . SearchAsync ( option , token ) )
6269 yield return result ;
6370 }
6471 public async IAsyncEnumerable < SearchResult > ContentSearchAsync ( string plainSearch ,
65- string contentSearch , [ EnumeratorCancellation ] CancellationToken token )
72+ string contentSearch ,
73+ [ EnumeratorCancellation ] CancellationToken token )
6674 {
6775 await ThrowIfEverythingNotAvailableAsync ( token ) ;
76+
6877 if ( ! Settings . EnableEverythingContentSearch )
6978 {
7079 throw new EngineNotAvailableException ( Enum . GetName ( Settings . IndexSearchEngineOption . Everything ) ! ,
@@ -74,16 +83,19 @@ public async IAsyncEnumerable<SearchResult> ContentSearchAsync(string plainSearc
7483 _ =>
7584 {
7685 Settings . EnableEverythingContentSearch = true ;
86+
7787 return ValueTask . FromResult ( true ) ;
7888 } ) ;
7989 }
90+
8091 if ( token . IsCancellationRequested )
8192 yield break ;
8293
8394 var option = new EverythingSearchOption ( plainSearch ,
8495 Settings . SortOption ,
8596 true ,
86- contentSearch ) ;
97+ contentSearch ,
98+ IsFullPathSearch : Settings . EverythingSearchFullPath ) ;
8799
88100 await foreach ( var result in EverythingApi . SearchAsync ( option , token ) )
89101 {
@@ -93,13 +105,15 @@ public async IAsyncEnumerable<SearchResult> ContentSearchAsync(string plainSearc
93105 public async IAsyncEnumerable < SearchResult > EnumerateAsync ( string path , string search , bool recursive , [ EnumeratorCancellation ] CancellationToken token )
94106 {
95107 await ThrowIfEverythingNotAvailableAsync ( token ) ;
108+
96109 if ( token . IsCancellationRequested )
97110 yield break ;
98111
99112 var option = new EverythingSearchOption ( search ,
100113 Settings . SortOption ,
101114 ParentPath : path ,
102- IsRecursive : recursive ) ;
115+ IsRecursive : recursive ,
116+ IsFullPathSearch : Settings . EverythingSearchFullPath ) ;
103117
104118 await foreach ( var result in EverythingApi . SearchAsync ( option , token ) )
105119 {
0 commit comments