Skip to content

Instantly share code, notes, and snippets.

@Yamakuzure
Created April 5, 2019 06:32
Show Gist options
  • Save Yamakuzure/d6b3eb2b0406229129aa7bfcf08212a4 to your computer and use it in GitHub Desktop.
Save Yamakuzure/d6b3eb2b0406229129aa7bfcf08212a4 to your computer and use it in GitHub Desktop.
diff --git a/src/basic/fileio.c b/src/basic/fileio.c
index e981cd024..ffcbf7309 100644
--- a/src/basic/fileio.c
+++ b/src/basic/fileio.c
@@ -156,7 +156,7 @@ int write_string_file_ts(
goto fail;
}
- f = fdopen(fd, "w");
+ f = fdopen(fd, "we");
if (!f) {
r = -errno;
safe_close(fd);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment