From: oetiker Date: Tue, 23 Mar 2004 21:34:28 +0000 (+0000) Subject: make sure fole is opened binary on restore ... to make things work on windows --... X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=0e35f35b43f96e2a805b2c4d73c0b5ccf5361975;p=rrdtool.git make sure fole is opened binary on restore ... to make things work on windows -- "Girod, Laurent" git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk/program@241 a5681a0c-68f1-0310-ab6d-d61299d08faa --- diff --git a/src/rrd_restore.c b/src/rrd_restore.c index 2c9a280..61b82c1 100644 --- a/src/rrd_restore.c +++ b/src/rrd_restore.c @@ -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; }