mirror of
https://github.com/meteor/meteor.git
synced 2026-05-02 03:01:46 -04:00
Don't crash on failed temp dir cleanup
This commit is contained in:
@@ -633,7 +633,14 @@ files.freeTempDir = function (tempDir) {
|
||||
// ignores all ENOENT calls. And we don't remove tempDir from tempDirs until
|
||||
// it's done, so that if mid-way through this rm_recursive the onExit one
|
||||
// fires, it still gets removed.
|
||||
files.rm_recursive(tempDir);
|
||||
try {
|
||||
files.rm_recursive(tempDir);
|
||||
} catch (err) {
|
||||
// Don't crash and print a stack trace because we failed to delete a temp
|
||||
// directory. This happens sometimes on Windows and seems to be
|
||||
// unavoidable.
|
||||
Console.debug(err);
|
||||
}
|
||||
tempDirs = _.without(tempDirs, tempDir);
|
||||
});
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user