Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/syncHandler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
// Licensed under the MIT license.

import * as path from "path";
import * as fse from "fs-extra";
import { commands, Disposable, FileSystemWatcher, RelativePattern, Uri, workspace } from "vscode";
import { instrumentOperation } from "vscode-extension-telemetry-wrapper";
import { Commands } from "./commands";
Expand Down Expand Up @@ -55,6 +56,9 @@ class SyncHandler implements Disposable {

for (const sourcePathData of result.data) {
const normalizedPath: string = Uri.file(sourcePathData.path).fsPath;
if (!(await fse.pathExists(normalizedPath))) {
continue;
}
const pattern: RelativePattern = new RelativePattern(normalizedPath, "**/*");
const watcher: FileSystemWatcher = workspace.createFileSystemWatcher(pattern);
this.disposables.push(watcher);
Expand Down