Conversation
brandonpayton
left a comment
There was a problem hiding this comment.
It would be good to add some tests like we have for mv() here:
|
@brandonpayton I added tests and found out that if you copy a directory recursively inside himself, it freezes, so I also throw an error when it happens. Let me know if something looks wrong. And thank you for your review. |
brandonpayton
left a comment
There was a problem hiding this comment.
Thanks, @mho22! This looks good to go except there appears to be one duplicate test. I left a note about that. Once that is fixed (if it is indeed an issue), let's merge!
| }); | ||
| }); | ||
|
|
||
| it('cp() from NODEFS to MEMFS should work', () => { |
There was a problem hiding this comment.
This looks like a duplicate of the previous test. Was this meant to be a MEMFS-to-NODEFS variation?
There was a problem hiding this comment.
You're right, I made a mistake here, I probably copy pasted it to work on the MEMFS to NODEFS later and forgot to implement it correctly. Done now.
Motivation for the change, related issues
Based on this issue
While playing with PHP.wasm, I found out it has a
mvmethod, but nocpmethod.Implementation details
FSHelpers.copyRecursiveinside thephp.cp()methodmv()when throwing errorsTesting Instructions
CI
or manually :
cp.ts:Output :