mirror of
https://github.com/nodejs/node.git
synced 2024-11-21 10:59:27 +00:00
watch: fix null fileName
on windows systems
PR-URL: https://github.com/nodejs/node/pull/49891 Reviewed-By: Moshe Atlow <moshe@atlow.co.il> Reviewed-By: Chemi Atlow <chemi@atlow.co.il> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
This commit is contained in:
parent
df16c69983
commit
9db4bf40d4
@ -98,7 +98,7 @@ class FilesWatcher extends EventEmitter {
|
||||
}
|
||||
const watcher = watch(path, { recursive, signal: this.#signal });
|
||||
watcher.on('change', (eventType, fileName) => this
|
||||
.#onChange(recursive ? resolve(path, fileName) : path));
|
||||
.#onChange(recursive ? resolve(path, fileName ?? '') : path));
|
||||
this.#watchers.set(path, { handle: watcher, recursive });
|
||||
if (recursive) {
|
||||
this.#removeWatchedChildren(path);
|
||||
|
Loading…
Reference in New Issue
Block a user