jprichardson / node-fs-extra

Node.js: extra methods for the fs object like copy(), remove(), mkdirs()
MIT License
9.47k stars 772 forks source link

Renaming case-only on smb-mounted fs doesn't work #921

Closed wmertens closed 3 years ago

wmertens commented 3 years ago

When case-only renaming a file that is on an SMB mount there's a good chance that the src and dst stats will return different inode numbers even though they are the same file.

This causes the pre-move check to fail to notice it's a case-only change.

I realize this is an edge case, and that there's no way to check if a rename would overwrite a file short of creating a file to see if the fs is case-sensitive in that directory. Maybe there's no solution and this is just behavior to document.

RyanZim commented 3 years ago

I'd agree this is just documentation; no reason to handle this edge case. I'm personally inclined to say leaving this issue for posterity is sufficient documentation given the super edge-case nature of this, so closing. Feel free to open a docs PR if you disagree.