mirror of
https://github.com/nodejs/node.git
synced 2026-11-27 17:52:27 -05:00
cpSync() did not honor errorOnExist when the destination directory already existed, while the asynchronous cp() does (fixed in the commit that added test-fs-cp-async-dir-exists-error-on-exist). Mirror that guard in the synchronous onDir() so both APIs behave identically. Signed-off-by: Daijiro Wachi <daijiro.wachi@gmail.com> PR-URL: https://github.com/nodejs/node/pull/64124 Reviewed-By: Luigi Pinca <luigipinca@gmail.com>