◐ Shell
clean mode source ↗

fs.cpSync does not copy files if destination path has accented characters on Windows

Version

v22.19.0

Platform

OS Name:                   Microsoft Windows 10 Pro
OS Version:                10.0.19045 N/A Build 19045

Subsystem

No response

What steps will reproduce the bug?

Copy a file tree to a destination path that has special characters like this:

fs.cpSync(source, "c:\users\user\Eyjafjallajökull-Pra,nckevičius", { recursive: true, force: true })

Where source is the path that contains files and directories, and the destination path exists.

How often does it reproduce? Is there a required condition?

100%

What is the expected behavior? Why is that the expected behavior?

I expect the file to be copied to the destination folder.

What do you see instead?

I see the operation completing without any errors, but no files or directories are copied.

Additional information

I can temporarily resolve the issue by adding a filter that always returns true:

fs.cpSync(source, destination, { recursive: true, force: true, filter: () = true })