Skip to content

Commit dd93d57

Browse files
authored
remove project basedir from file watcher exclusion pattern (#117)
1 parent 21ad4be commit dd93d57

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/extension.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { existsSync } from 'fs';
2-
import path, { join } from 'path';
2+
import { join } from 'path';
33
import { format } from 'util';
44
import {
55
ConfigurationTarget,
@@ -69,7 +69,7 @@ export async function activate(context: ExtensionContext) {
6969
'isBazelWorkspaceRoot',
7070
isBazelWorkspaceRoot()
7171
);
72-
// create .eclipse/.bazelproject file is DNE
72+
// create .eclipse/.bazelproject file if DNE
7373
if (isBazelWorkspaceRoot()) {
7474
initBazelProjectFile();
7575
const showBazelprojectConfig =
@@ -271,10 +271,9 @@ async function syncProjectViewDirectories() {
271271
(k) => k.includes('.vscode') && k.includes('.eclipse')
272272
).length;
273273

274-
const baseFolder = getWorkspaceRoot().split(path.sep).reverse()[0];
275274
const fileWatcherExcludePattern = viewAll
276275
? ''
277-
: `**/${baseFolder}/!(${Array.from(displayFolders).join('|')})/**`;
276+
: `**/!(${Array.from(displayFolders).join('|')})/**`;
278277

279278
if (viewAll) {
280279
// if viewAll and existing config doesn't contain .vscode/.eclipse return

0 commit comments

Comments
 (0)