]> git.sur5r.net Git - bacula/bacula/commitdiff
Fix restore of Windows streams to non-Windows machines
authorKern Sibbald <kern@sibbald.com>
Fri, 18 Dec 2015 11:35:04 +0000 (12:35 +0100)
committerKern Sibbald <kern@sibbald.com>
Sat, 19 Dec 2015 07:42:19 +0000 (08:42 +0100)
bacula/src/filed/restore.c

index 24580bd88a28d408324c7a5548480bc91812e9f8..b6c2819e8542114f4d5a6f12caa6ecd78b851a2a 100644 (file)
@@ -1295,9 +1295,7 @@ static bool store_data(r_ctx &rctx, char *data, const int32_t length, bool win32
                jcr->last_fname, be.bstrerror(bfd->berrno));
          return false;
       }
-   }
-
-   if ((wstat=bwrite(bfd, data, length)) != (ssize_t)length) {
+   } else if ((wstat=bwrite(bfd, data, length)) != (ssize_t)length) {
       berrno be;
       int type = M_ERROR;
       int len = strlen(jcr->last_fname);