sindresorhus / tempy

Get a random temporary file or directory path
MIT License
423 stars 26 forks source link

Error: EXDEV: cross-device link not permitted #39

Closed ad-si closed 2 years ago

ad-si commented 2 years ago

This came up in https://github.com/feramhq/transity/issues/32

Summary

The tempy library uses rename to move the files under Linux. While moving a directory to the temporary directory, an error occurred because:

EXDEV oldpath and newpath are not on the same mounted filesystem. (Linux permits a filesystem to be mounted at multiple points, but rename() does not work across different mount points, even if the same filesystem is mounted on both.)

For more, see man rename manpage: http://man7.org/linux/man-pages/man2/rename.2.html

sindresorhus commented 2 years ago

I don't see any "rename" usage: https://github.com/sindresorhus/tempy/blob/main/index.js

ad-si commented 2 years ago

Sorry, should have better checked the issue before forwarding it. 😅 This seems to be a problem of nightmare …