@@ -42,29 +42,38 @@ private async ValueTask ThrowIfEverythingNotAvailableAsync(CancellationToken tok
42
42
private async ValueTask < bool > ClickToInstallEverythingAsync ( ActionContext _ )
43
43
{
44
44
var installedPath = await EverythingDownloadHelper . PromptDownloadIfNotInstallAsync ( Settings . EverythingInstalledPath , Main . Context . API ) ;
45
+
45
46
if ( installedPath == null )
46
47
{
47
48
Main . Context . API . ShowMsgError ( "Unable to find Everything.exe" ) ;
49
+
48
50
return false ;
49
51
}
52
+
50
53
Settings . EverythingInstalledPath = installedPath ;
51
54
Process . Start ( installedPath , "-startup" ) ;
55
+
52
56
return true ;
53
57
}
54
58
55
59
public async IAsyncEnumerable < SearchResult > SearchAsync ( string search , [ EnumeratorCancellation ] CancellationToken token )
56
60
{
57
61
await ThrowIfEverythingNotAvailableAsync ( token ) ;
62
+
58
63
if ( token . IsCancellationRequested )
59
64
yield break ;
60
- var option = new EverythingSearchOption ( search , Settings . SortOption ) ;
65
+
66
+ var option = new EverythingSearchOption ( search , Settings . SortOption , IsFullPathSearch : Settings . EverythingSearchFullPath ) ;
67
+
61
68
await foreach ( var result in EverythingApi . SearchAsync ( option , token ) )
62
69
yield return result ;
63
70
}
64
71
public async IAsyncEnumerable < SearchResult > ContentSearchAsync ( string plainSearch ,
65
- string contentSearch , [ EnumeratorCancellation ] CancellationToken token )
72
+ string contentSearch ,
73
+ [ EnumeratorCancellation ] CancellationToken token )
66
74
{
67
75
await ThrowIfEverythingNotAvailableAsync ( token ) ;
76
+
68
77
if ( ! Settings . EnableEverythingContentSearch )
69
78
{
70
79
throw new EngineNotAvailableException ( Enum . GetName ( Settings . IndexSearchEngineOption . Everything ) ! ,
@@ -74,16 +83,19 @@ public async IAsyncEnumerable<SearchResult> ContentSearchAsync(string plainSearc
74
83
_ =>
75
84
{
76
85
Settings . EnableEverythingContentSearch = true ;
86
+
77
87
return ValueTask . FromResult ( true ) ;
78
88
} ) ;
79
89
}
90
+
80
91
if ( token . IsCancellationRequested )
81
92
yield break ;
82
93
83
94
var option = new EverythingSearchOption ( plainSearch ,
84
95
Settings . SortOption ,
85
96
true ,
86
- contentSearch ) ;
97
+ contentSearch ,
98
+ IsFullPathSearch : Settings . EverythingSearchFullPath ) ;
87
99
88
100
await foreach ( var result in EverythingApi . SearchAsync ( option , token ) )
89
101
{
@@ -93,13 +105,15 @@ public async IAsyncEnumerable<SearchResult> ContentSearchAsync(string plainSearc
93
105
public async IAsyncEnumerable < SearchResult > EnumerateAsync ( string path , string search , bool recursive , [ EnumeratorCancellation ] CancellationToken token )
94
106
{
95
107
await ThrowIfEverythingNotAvailableAsync ( token ) ;
108
+
96
109
if ( token . IsCancellationRequested )
97
110
yield break ;
98
111
99
112
var option = new EverythingSearchOption ( search ,
100
113
Settings . SortOption ,
101
114
ParentPath : path ,
102
- IsRecursive : recursive ) ;
115
+ IsRecursive : recursive ,
116
+ IsFullPathSearch : Settings . EverythingSearchFullPath ) ;
103
117
104
118
await foreach ( var result in EverythingApi . SearchAsync ( option , token ) )
105
119
{
0 commit comments