mirror of
https://github.com/meteor/meteor.git
synced 2026-05-02 03:01:46 -04:00
@@ -13,7 +13,13 @@ exports.makeLink = function (target, linkPath) {
|
||||
fs.writeFileSync(tempPath, target, "utf8");
|
||||
}
|
||||
|
||||
fs.renameSync(tempPath, linkPath);
|
||||
try {
|
||||
fs.renameSync(tempPath, linkPath);
|
||||
} catch (e) {
|
||||
// If renaming fails, try unlinking first.
|
||||
fs.unlinkSync(linkPath);
|
||||
fs.renameSync(tempPath, linkPath);
|
||||
}
|
||||
};
|
||||
|
||||
exports.readLink = function (linkPath) {
|
||||
|
||||
Reference in New Issue
Block a user