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=afbab79d68867349fe06a2948ae0c911d5b81bc8;p=rrdtool-all.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@241 a5681a0c-68f1-0310-ab6d-d61299d08faa --- diff --git a/program/src/rrd_restore.c b/program/src/rrd_restore.c index 2c9a2809..61b82c16 100644 --- a/program/src/rrd_restore.c +++ b/program/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; }