Open wxfred opened 1 month ago
fs.cpSync in v20.17.0 is no error. And v20.17.0 has the new feature --experimental-require-module too, it saved me, thanks.
Likely a regression caused by https://github.com/nodejs/node/pull/53614 - this only shows up on Windows where the native encoding is UTF16. It's possibly caused by the incorrect use of UTF8 path data https://github.com/nodejs/node/pull/53614#discussion_r1726683912
cc @nodejs/platform-windows
Version
v22.6.0
Platform
Subsystem
fs
What steps will reproduce the bug?
fs.cpSync will crash if the dir contains chinese, like fs.cpSync('C:/新建文件夹', 'C:/model', { recursive: true })
How often does it reproduce? Is there a required condition?
always
What is the expected behavior? Why is that the expected behavior?
fs.cpSync can handle the dir with chinese
What do you see instead?
no output, only crash
Additional information
No response