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

[Bug]: fs module on Windows cannot handle special characters #41659

Closed
3 tasks done
JasonYeMSFT opened this issue Mar 22, 2024 · 2 comments · Fixed by #41673
Closed
3 tasks done

[Bug]: fs module on Windows cannot handle special characters #41659

JasonYeMSFT opened this issue Mar 22, 2024 · 2 comments · Fixed by #41673
Assignees
Labels
29-x-y bug 🪲 has-repro-comment Issue has repro in comments platform/windows status/reviewed A maintainer made an initial review but not reproduced the issue

Comments

@JasonYeMSFT
Copy link

Preflight Checklist

Electron Version

29.1.4

What operating system are you using?

Windows

Operating System Version

10.0.22631

What arch are you using?

x64

Last Known Working Electron version

28.2.8

Expected Behavior

Be able to write to create a file with a valid file name.

For example, add these two lines in the main.js script.

const fs = require("fs");
fs.writeFileSync("./test.txt🍕🍕", "Hello World", "utf-8");

Actual Behavior

Fail with Error: ENOENT: no such file or directory.

Testcase Gist URL

No response

Additional Information

This is a node bug and the Node team is fixing it in a new Node release: nodejs/node#48673

Electron v29.1.x is currently on a buggy node version that also suffers from this bug. Is there any plan to address it in a patched Electron release?

@jkleinsc jkleinsc added status/reviewed A maintainer made an initial review but not reproduced the issue has-repro-comment Issue has repro in comments 29-x-y labels Mar 22, 2024
@codebytere codebytere self-assigned this Mar 22, 2024
@Prinzhorn
Copy link
Contributor

Is this different from #41484 ?

@JasonYeMSFT
Copy link
Author

Is this different from #41484 ?

I think they probably share the same root cause. When we hit the problem we were exclusively trying to write using fs instead trying to read the file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
29-x-y bug 🪲 has-repro-comment Issue has repro in comments platform/windows status/reviewed A maintainer made an initial review but not reproduced the issue
Projects
No open projects
Status: 🛠️ Fixed for Next Release
Development

Successfully merging a pull request may close this issue.

4 participants