diff --git a/server/plugins/watch.ts b/server/plugins/watch.ts index 9c0b96c..984d27f 100644 --- a/server/plugins/watch.ts +++ b/server/plugins/watch.ts @@ -25,9 +25,11 @@ export default class Watch { } onContentChange(changes: FileWatchEvent[]) { - for (const change of changes) + for (const change of changes) { + const path = pathutil.join(this.config.root, change.path); if (change.type === LSP.FileChangeType.Deleted) - this.services.Scanner.delete(change.path); - else this.services.Scanner.update(change.path); + this.services.Scanner.delete(path); + else this.services.Scanner.update(path); + } } }