mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-21 08:25:43 -05:00
Fix the error callback of the present directory watcher
This commit is contained in:
@@ -291,12 +291,11 @@ namespace ts {
|
||||
callback
|
||||
);
|
||||
dirWatcher.on("error", () => {
|
||||
if (!directoryExists(directoryName)) {
|
||||
// Deleting directory
|
||||
watcher = watchMissingDirectory();
|
||||
// Call the callback for current directory
|
||||
callback("rename", "");
|
||||
}
|
||||
// Watch the missing directory
|
||||
watcher.close();
|
||||
watcher = watchMissingDirectory();
|
||||
// Call the callback for current directory
|
||||
callback("rename", "");
|
||||
});
|
||||
return dirWatcher;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user