X-Git-Url: http://git.madism.org/?p=apps%2Fmadmutt.git;a=blobdiff_plain;f=lib-lib%2Ffile.c;h=de3c75b0288b8e6cf10b9582e944a88479366b82;hp=978895af0734b9c6f356b1d13ca3c12b6b40f1c0;hb=92f2fc3802e13a8eb0717123c588d855fa0de67f;hpb=9faa4e03a4cf3204d1b4a8d622d33dd9c4596ca7 diff --git a/lib-lib/file.c b/lib-lib/file.c index 978895a..de3c75b 100644 --- a/lib-lib/file.c +++ b/lib-lib/file.c @@ -506,7 +506,7 @@ int m_tempfd(char *dst, ssize_t n, const char *dir, const char *fmt) m_tempftplize(tpl, sizeof(tpl), fmt, raw); } - fd = open(path, O_CREAT | O_EXCL | O_WRONLY | O_NOFOLLOW, 0600); + fd = open(path, O_CREAT | O_EXCL | O_RDWR | O_NOFOLLOW, 0600); if (fd < 0) { if (errno == EEXIST)