From d426510f6e1cc6d56d6acfd579d5361c5720bdcc Mon Sep 17 00:00:00 2001 From: Kern Sibbald Date: Wed, 23 Oct 2002 16:04:32 +0000 Subject: [PATCH] Fix Win32 file size restore bug git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@174 91ce42f0-d328-0410-95d8-f526ca767f89 --- bacula/src/findlib/attribs.c | 2 +- bacula/src/findlib/create_file.c | 2 +- bacula/src/version.h | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/bacula/src/findlib/attribs.c b/bacula/src/findlib/attribs.c index ad8bedd365..c35aaed4c4 100755 --- a/bacula/src/findlib/attribs.c +++ b/bacula/src/findlib/attribs.c @@ -347,7 +347,7 @@ int set_win32_attributes(void *jcr, char *fname, char *ofile, char *lname, if (*ofd == -1) { Dmsg1(100, "File not open: %s\n", ofile); - fid = open(ofile, O_RDWR); /* attempt to open the file */ + fid = open(ofile, O_RDWR|O_BINARY); /* attempt to open the file */ if (fid >= 0) { *ofd = fid; } diff --git a/bacula/src/findlib/create_file.c b/bacula/src/findlib/create_file.c index 66e4921030..12e8ede309 100644 --- a/bacula/src/findlib/create_file.c +++ b/bacula/src/findlib/create_file.c @@ -125,7 +125,7 @@ int create_file(void *jcr, char *fname, char *ofile, char *lname, ofile[pnl] = savechr; /* restore full name */ Dmsg1(100, "Create file %s\n", ofile); - mode = O_WRONLY | O_CREAT | O_TRUNC; + mode = O_WRONLY | O_CREAT | O_TRUNC | O_BINARY; if (IS_CTG(statp->st_mode)) { mode |= O_CTG; /* set contiguous bit if needed */ } diff --git a/bacula/src/version.h b/bacula/src/version.h index 4c0c418203..368f91e999 100644 --- a/bacula/src/version.h +++ b/bacula/src/version.h @@ -1,8 +1,8 @@ /* */ #define VERSION "1.27" #define VSTRING "1" -#define DATE "22 October 2002" -#define LSMDATE "22Oct02" +#define DATE "23 October 2002" +#define LSMDATE "23Oct02" /* Debug flags */ #define DEBUG 1 -- 2.39.2