From 1efc4735a73dad1b56242a16c3309d205b66fe0d Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Wed, 16 May 2018 08:24:42 +0200 Subject: [PATCH] fix #49553 --- src/vs/base/node/config.ts | 2 +- src/vs/base/node/extfs.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/vs/base/node/config.ts b/src/vs/base/node/config.ts index 5d71bada882..d08120cfbfc 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 0dbc27ed24c..3ffedc2d347 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); -- GitLab