Use relativepattern for file watcher

For #143291
pull/143652/head
Matt Bierner 2022-02-22 08:45:42 -08:00
parent 46301339b7
commit 1678c27fcd
No known key found for this signature in database
GPG Key ID: 099C331567E11888
1 changed files with 1 additions and 1 deletions

View File

@ -143,7 +143,7 @@ class Preview extends Disposable {
this._previewState = PreviewState.Disposed;
}));
const watcher = this._register(vscode.workspace.createFileSystemWatcher(resource.fsPath));
const watcher = this._register(vscode.workspace.createFileSystemWatcher(new vscode.RelativePattern(resource, '*')));
this._register(watcher.onDidChange(e => {
if (e.toString() === this.resource.toString()) {
this.render();