node icon indicating copy to clipboard operation
node copied to clipboard

fs: normalize cpSync and related methods to accept Buffer and URL paths (#58634)

Open vedant713 opened this issue 6 months ago • 0 comments

This patch ensures that fs.cpSync and copyDir handle Buffer and URL types for the src and dest arguments by normalizing them to string paths using toString() and fileURLToPath() respectively.

Previously, these inputs would cause type errors when passed to path.join(), as the implementation assumed string paths.

Fixes: #58634

vedant713 avatar Jun 12 '25 00:06 vedant713