mirror of
https://github.com/meteor/meteor.git
synced 2026-05-02 03:01:46 -04:00
Make rm_recursive synchronous if not in fiber
This commit is contained in:
@@ -250,12 +250,15 @@ files.statOrNull = function (path) {
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
// Like rm -r.
|
||||
files.rm_recursive = function (p) {
|
||||
var fut = new Future();
|
||||
rimraf(convertToOSPath(p), { busyTries: 10 }, fut.resolver());
|
||||
fut.wait();
|
||||
if (Fiber.current && Fiber.yield && ! Fiber.yield.disallowed) {
|
||||
var fut = new Future();
|
||||
rimraf(convertToOSPath(p), { busyTries: 10 }, fut.resolver());
|
||||
fut.wait();
|
||||
} else {
|
||||
rimraf.sync(convertToOSPath(p));
|
||||
}
|
||||
};
|
||||
|
||||
// Makes all files in a tree read-only.
|
||||
|
||||
Reference in New Issue
Block a user