diff --git a/src/vs/base/node/config.ts b/src/vs/base/node/config.ts index 5d71bada8826aab949e9e241e086037866f728f6..d08120cfbfcd07925068d17c07fa17f06cfed4cb 100644 --- a/src/vs/base/node/config.ts +++ b/src/vs/base/node/config.ts @@ -171,7 +171,7 @@ export class ConfigWatcher implements IConfigWatcher, IDisposable { // Windows: in some cases the filename contains artifacts from the absolute path // see https://github.com/nodejs/node/issues/19170 // As such, we have to ensure that the filename basename is used for comparison. - if (isWindows && filename !== this.configName) { + if (isWindows && filename && filename !== this.configName) { filename = basename(filename); } diff --git a/src/vs/base/node/extfs.ts b/src/vs/base/node/extfs.ts index 0dbc27ed24cc99d8f2dde169588c599e690187fa..3ffedc2d347e4c671566fb1f7bcfd97fb77be97e 100644 --- a/src/vs/base/node/extfs.ts +++ b/src/vs/base/node/extfs.ts @@ -620,7 +620,7 @@ function normalizePath(path: string): string { return strings.rtrim(paths.normalize(path), paths.sep); } -export function watch(path: string, onChange: (type: string, path: string) => void, onError: (error: string) => void): fs.FSWatcher { +export function watch(path: string, onChange: (type: string, path?: string) => void, onError: (error: string) => void): fs.FSWatcher { try { const watcher = fs.watch(path);