I'm such a fool
authorPierre Habouzit <madcoder@debian.org>
Fri, 24 Nov 2006 23:01:43 +0000 (00:01 +0100)
committerPierre Habouzit <madcoder@debian.org>
Fri, 24 Nov 2006 23:01:43 +0000 (00:01 +0100)
YES WE DO WANT TO WRITE IN OUR TEMPORARY FILES.
*g*

lib-lib/file.c

index 978895a..de3c75b 100644 (file)
@@ -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);
     }
 
         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)
 
     if (fd < 0) {
         if (errno == EEXIST)