Skip to content
This repository was archived by the owner on Nov 18, 2022. It is now read-only.

Commit 65480c5

Browse files
committed
apply hack only to windows + add clarifying comment
1 parent 1a761d8 commit 65480c5

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/extension.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,8 +207,14 @@ class ClientWorkspace {
207207
return this.makeRlsProcess();
208208
};
209209

210+
// Something else is put front of files when pattern matching that prevents the windows version from picking up the files
211+
// This should be safe as the uri is a absolute path that includes the drive + colon
212+
// i.e. a pattern would become "**/c:/some/path**" and since colon is reserved only the root can ever contain it.
213+
const isWin = process.platform === 'win32';
214+
const windowsHack = isWin ? '**' : '';
215+
210216
const pattern = this.config.multiProjectEnabled
211-
? `**${this.folder.uri.path}/**`
217+
? `${windowsHack}${this.folder.uri.path}/**`
212218
: undefined;
213219

214220
const collectionName = this.config.multiProjectEnabled

0 commit comments

Comments
 (0)