copyDirRecursive calls itself from the rmdirRecursive callback when newDir exists. It should call itself with the original copyDirRecursive arguments, not the callback arguments.
Also fun.apply(thisArg, argsArray) expects argsArray to be an array (see here) but arguments is not an array (see here)
Very similar to pull request 56 (I wrote my code before I noticed danielholmes did a similar fix).
Fixes a bug (not sure if has been reported).
copyDirRecursive
calls itself from thermdirRecursive
callback when newDir exists. It should call itself with the original copyDirRecursive arguments, not the callback arguments.Also
fun.apply(thisArg, argsArray)
expects argsArray to be an array (see here) butarguments
is not an array (see here)Very similar to pull request 56 (I wrote my code before I noticed danielholmes did a similar fix).