You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fs.cp of a directory fails on VFS (regression from the fast path) #67892
How often does it reproduce? Is there a required condition?
Always.
What is the expected behavior? Why is that the expected behavior?
Copying a directory on a VFS mount works.
What do you see instead?
ENOTDIR: not a directory, mkdir '/dev/null/vfs/1/dst'
Additional information
The fast path from #65488 (29667e0) is at lib/internal/fs/cp/cp.js:319. It sends the whole folder copy to native code. Native code does not know about VFS, so /dev/null/vfs/1/... looks like a real path and fails.
The copy with a filter works. A filter does not change what gets copied; it only skips the fast path and runs the old JS walk. So the fast path is the broken part.
Related: fs.cpSync also fails on VFS, but that is not a regression. It probably needs a separate issue.
Activity