mirror of
https://github.com/microsoft/TypeScript.git
synced 2025-11-18 17:21:48 +00:00
Fix the error callback of the present directory watcher
This commit is contained in:
+5
-6
@@ -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