]> git.sur5r.net Git - bacula/bacula/commitdiff
Fix Win32 file size restore bug
authorKern Sibbald <kern@sibbald.com>
Wed, 23 Oct 2002 16:04:32 +0000 (16:04 +0000)
committerKern Sibbald <kern@sibbald.com>
Wed, 23 Oct 2002 16:04:32 +0000 (16:04 +0000)
git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@174 91ce42f0-d328-0410-95d8-f526ca767f89

bacula/src/findlib/attribs.c
bacula/src/findlib/create_file.c
bacula/src/version.h

index ad8bedd365f6570ce8a19d6553049ef50324090d..c35aaed4c4fd864b3b5005586a352a0d6d76264c 100755 (executable)
@@ -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;
       }
index 66e4921030ae34848dba3bb9a325f7bd3fcb5b24..12e8ede30905b881c9d0006091d2cd4174ad6d51 100644 (file)
@@ -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 */
       }
index 4c0c418203c2af5a1ff9e2c983d2faf1fd48699c..368f91e9999716ccbb5ef61324a73f61706cac49 100644 (file)
@@ -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