mirror of
https://github.com/meteor/meteor.git
synced 2026-05-02 03:01:46 -04:00
* Improve `fs-extra.move` calls for Windows platform. This is a follow-up to meteor/meteor#8491 which worked properly on Unix platforms, but failed in a variety of ways on Windows due to its lack of Fiber-awareness and desire to create symlinks as unprivileged users (something not always possible on Windows). The Fiber issue was observed when trying to remove "src" directories within the `move` function (which tries a variety of OS/OS/arch-specific techniques to accomplish its goal) after they had been copied to "dest". On Windows, this resulted in `EDIRNOTEMPTY` errors since Windows appears to temporarily cache the file-handle or doesn't release the file-handle until the next tick. The symlink issue will hopefully improve in an upcoming release of Windows (Creator Edition) when Microsoft makes it possible to create symlinks as an unprivileged user, however it will still require enabling "Developer" mode in Windows settings. This implements the same catch which was already in place for `fs.rename` on the `fs.move` provided by `fs-extra`. Performance gains were the same in tests comparing before and after these changes. Relates to: https://github.com/meteor/meteor/issues/8558#issuecomment-291194385 * A few code-cleanups to my original commit.