-
-
Notifications
You must be signed in to change notification settings - Fork 153
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
EXDEV: cross-device link not permitted, rename #106
Comments
I fake reproduced this error by modifying my
|
I have created a PR, and tested that it works with my fake reproduced error. |
We could have added workaround in |
https://github.com/sindresorhus/conf/releases/tag/v6.2.3 Just reinstall |
This sounds more like a Node.js bug to me. |
I feel more like it’s an OS bug or limitation in Windows 10. Im pretty sure the low level api call rename is giving this error to nodejs. since rename is specified to be atomic, then it has to throw because doing anything else would break its atomicity guarantee. It kind of sucks because it’s a special case that any developer who uses rename (or write-file-atomic) needs to handle. And it is very obscure and hard to reproduce. Node.js fs.rename uses libuv uv_fs_rename which says "Equivalent to rename(2)" |
A user of my electron app is getting this error on Windows:
See mifi/lossless-cut#292
It is renaming from one drive to the same drive, so I'm not sure why it's giving this error, but it could be some virtual drive stuff going on on windows, especially when running as an
appx
from Windows Store.I found that npm had the same issue before:
npm/npm#13306 (comment)
...also not really cross-device moving, but it crashes still.
It seems like node-fs-extra already has built-in support for handling this case:
I see that in
Conf
, whichelectron-store
is using, you are usingwrite-file-atomic
, which is the one that is throwingEXDEV
. Maybe better to switch to the more robust fs-extra, or at least catch EXDEV and then instead copy/delete the file? What do you think?The text was updated successfully, but these errors were encountered: