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
CheckPath Error -> Warn of Inode. #666
Conversation
@Domvel, Ive been following you in all the comments from various bugs referring the same issue. |
@iamsim Oh, I have a stalker. 😄 There is no software-workaround. Because the method Until this bug will not be fixed, there are two known "workarounds" It's more a dilemma:
If the maintainers of As I suggested: Just remove the state.ino check and let the OS or the underlayed libs throw errors, if source === destination. I can't understand the relaxed behavior for this critical bug. I can not say when and if the problem will ever be fixed. |
Doing this now! Really thank you for a response. 🙂 |
@@ -182,7 +182,11 @@ function checkStats (src, dest) { | |||
function checkPaths (src, dest) { | |||
const {srcStat, destStat} = checkStats(src, dest) | |||
if (destStat.ino && destStat.ino === srcStat.ino) { | |||
throw new Error('Source and destination must not be the same.') | |||
console.warn( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Considering your comment on the fact that inodes can be the same when copying across volumes, then this is a totally valid use case, I would remove this warning and the if statement alltogether.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is just a hotfix to disable the Inode check completely and just log a warning. Not only when copying across volumes. Also big integer issue. It just disables the checkPath in a way that it does not throw an error in this case.
Anyway, this pull-requests can be closed. If I understand it correctly, the issue will be fixed in #667 too.
Closing this as the issue is fixed in |
Fixes #657
The inode number is an integer unique to the volume upon which it is stored.
That means, the method checkPaths() disallows me to copy a file from one to another volume.
Also
fs-extra
does not set the big-integer flag of nodefs
. It's only a "default" JavaScript number (max integer is 53-bit). See the difference here On Windows the cap is reached.No option provided, because checking if Inode is the wrong way. It's not only a big-integer issue. Inodes are only unique to the volume upon which it is stored.
This will fix the issue #657
I keep it as warning to see it when is happen.
Maybe not the best solution. But with the thrown error, it is not possible to use it.
Example: It's not possible to stable build with Android-Cordova 8.x. Because Cordova switched to
fs-extra
since version 8.x.Better solutions are welcome. But keep in mind that the Inode (state.ino of fs) is not really unique global and in current fs-extra implementation. Again:
state.ino
offs
also supportsbig-integer
. Node version 10.4 is required to use this. But currently it's set fornumber
(53-bit) only.The aim is to remove / replace this check. Because it's faulty. (Inode) You'll get errors from
fs
/os
.