Code

make sure fole is opened binary on restore ... to make things work on windows --...
authoroetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa>
Tue, 23 Mar 2004 21:34:28 +0000 (21:34 +0000)
committeroetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa>
Tue, 23 Mar 2004 21:34:28 +0000 (21:34 +0000)
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk/program@241 a5681a0c-68f1-0310-ab6d-d61299d08faa

src/rrd_restore.c

index 2c9a280909df2645d73706538e67a22e3c23d221..61b82c16e4fa88660e33420dbdbb4243eb307909 100644 (file)
@@ -415,7 +415,7 @@ rrd_write(char *file_name, rrd_t *rrd, char force_overwrite)
     if (strcmp("-",file_name)==0){
       rrd_file= stdout;
     } else {
-      fdflags = O_WRONLY|O_CREAT;
+      fdflags = O_WRONLY|O_CREAT|O_BINARY|O_EXCL;
       if (force_overwrite == 0) {
        fdflags |= O_EXCL;
       }