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

writefile not working correctly on Linux #932

Open
WolfBearGames opened this issue Feb 15, 2024 · 0 comments
Open

writefile not working correctly on Linux #932

WolfBearGames opened this issue Feb 15, 2024 · 0 comments

Comments

@WolfBearGames
Copy link

What OS are you using (uname -a, or Windows version)?

Linux nobara-mini 6.7.0-204.fsync.fc39.x86_64 #1 SMP PREEMPT_DYNAMIC TKG Wed Jan 17 09:24:55 UTC 2024 x86_64 GNU/Linux

What version Socket Runtime are you using?

0.5.4

What did you expect to see and what you saw instead?

await fs.writeFile(filepath, "Some String");
console.log("text saved to " + filepath);

Assuming "filepath" is a valid path to a .txt. file I would expect the content of the file is set to "Some String" and the log shows "text saved to ..."

Instead, the file is only partially overwritten from the beginning of the file (ist starts with "Some String" and then the rest of the previous content of the file follows. Additionally, the "console.log("text saved to " + filepath); line is never executed. The execution seems to be stuck.

On Windows the method works as expected (the complete file is overwritten with "Some String" and the console.log instruction is executed).

See an test app for reference:
fs test app

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant