using `RelativePattern` exclude and pattern causes an error

Fixes #227035
pull/227036/head
andreamah 2024-08-28 22:17:03 -07:00
parent 0e542f326f
commit 22c7f8f3be
No known key found for this signature in database
GPG Key ID: B4CCC97963B6245C
1 changed files with 3 additions and 2 deletions

View File

@ -28,6 +28,7 @@ import { IEditSessionIdentityService } from 'vs/platform/workspace/common/editSe
import { EditorResourceAccessor, SaveReason, SideBySideEditor } from 'vs/workbench/common/editor';
import { coalesce, firstOrDefault } from 'vs/base/common/arrays';
import { ICanonicalUriService } from 'vs/platform/workspace/common/canonicalUri';
import { revive } from 'vs/base/common/marshalling';
@extHostNamedCustomer(MainContext.MainThreadWorkspace)
export class MainThreadWorkspace implements MainThreadWorkspaceShape {
@ -146,7 +147,7 @@ export class MainThreadWorkspace implements MainThreadWorkspaceShape {
const query = this._queryBuilder.file(
includeFolder ? [includeFolder] : workspace.folders,
options
revive(options)
);
return this._searchService.fileSearch(query, token).then(result => {
@ -164,7 +165,7 @@ export class MainThreadWorkspace implements MainThreadWorkspaceShape {
const workspace = this._contextService.getWorkspace();
const folders = folder ? [folder] : workspace.folders.map(folder => folder.uri);
const query = this._queryBuilder.text(pattern, folders, options);
const query = this._queryBuilder.text(pattern, folders, revive(options));
query._reason = 'startTextSearch';
const onProgress = (p: ISearchProgressItem) => {