I hit the following issue on v4.2.6. An EMFILE error occurred on a copyFile; then on the retry attempt, another EMFILE error occurred, but that one bubbled up.
The copyFile function needs to be slightly modified to follow the same pattern as the other functions.
The
copyFile
wrapper implemented in #199 has a small flaw. Unlike the other wrappers, theenqueue
function of copyFile https://github.com/isaacs/node-graceful-fs/pull/199/files#diff-05bab169a94002226e0f82bf51c510b4fd2c6cd53f5d558c1ea4136c24a0d7c8R177-R179 enqueues the wrapped function (fs$copyFile
) rather than the wrapper which implements the enqueue + retry logic (go$copyFile
).I hit the following issue on
v4.2.6
. AnEMFILE
error occurred on acopyFile
; then on the retry attempt, anotherEMFILE
error occurred, but that one bubbled up.The
copyFile
function needs to be slightly modified to follow the same pattern as the other functions.I can try to open a PR soon, but basically the following snippet (https://github.com/isaacs/node-graceful-fs/pull/199/files#diff-05bab169a94002226e0f82bf51c510b4fd2c6cd53f5d558c1ea4136c24a0d7c8R177-R179) needs to be changed:
should be