Skip to content

Commit a4ba348

Browse files
authored
Fixes file watcher (#18)
1 parent 3f53a17 commit a4ba348

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

server/plugins/watch.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,11 @@ export default class Watch {
2525
}
2626

2727
onContentChange(changes: FileWatchEvent[]) {
28-
for (const change of changes)
28+
for (const change of changes) {
29+
const path = pathutil.join(this.config.root, change.path);
2930
if (change.type === LSP.FileChangeType.Deleted)
30-
this.services.Scanner.delete(change.path);
31-
else this.services.Scanner.update(change.path);
31+
this.services.Scanner.delete(path);
32+
else this.services.Scanner.update(path);
33+
}
3234
}
3335
}

0 commit comments

Comments
 (0)