Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v22.6.0 fs.cpSync crash #54476

Closed
wxfred opened this issue Aug 21, 2024 · 3 comments · Fixed by #55015
Closed

v22.6.0 fs.cpSync crash #54476

wxfred opened this issue Aug 21, 2024 · 3 comments · Fixed by #55015
Labels
fs Issues and PRs related to the fs subsystem / file system. windows Issues and PRs related to the Windows platform.

Comments

@wxfred
Copy link

wxfred commented Aug 21, 2024

Version

v22.6.0

Platform

Microsoft Windows NT 10.0.19045.0 x64

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

@RedYetiDev RedYetiDev added the fs Issues and PRs related to the fs subsystem / file system. label Aug 21, 2024
@wxfred
Copy link
Author

wxfred commented Aug 22, 2024

fs.cpSync in v20.17.0 has no error. And v20.17.0 has the new feature --experimental-require-module too, it saved me, thanks.

@joyeecheung
Copy link
Member

joyeecheung commented Aug 22, 2024

Likely a regression caused by #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 #53614 (comment)

@anonrig
Copy link
Member

anonrig commented Sep 1, 2024

cc @nodejs/platform-windows

@anonrig anonrig added the windows Issues and PRs related to the Windows platform. label Sep 1, 2024
@joyeecheung joyeecheung reopened this Sep 23, 2024
targos pushed a commit that referenced this issue Oct 4, 2024
PR-URL: #54653
Fixes: #54476
Reviewed-By: Yagiz Nizipli <[email protected]>
Reviewed-By: Antoine du Hamel <[email protected]>
Reviewed-By: Joyee Cheung <[email protected]>
Reviewed-By: James M Snell <[email protected]>
louwers pushed a commit to louwers/node that referenced this issue Nov 2, 2024
PR-URL: nodejs#54653
Fixes: nodejs#54476
Reviewed-By: Yagiz Nizipli <[email protected]>
Reviewed-By: Antoine du Hamel <[email protected]>
Reviewed-By: Joyee Cheung <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fs Issues and PRs related to the fs subsystem / file system. windows Issues and PRs related to the Windows platform.
Projects
None yet
4 participants