From: Tobias 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-Tag: 1.2rc1~93 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=997e2222670ef7055c0c58e801443d1ad7e3278a;p=thirdparty%2Frrdtool-1.x.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 2c9a2809..61b82c16 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; }