]> git.sur5r.net Git - bacula/bacula/commitdiff
This patch should fix bug #1366
authorMarco van Wieringen <mvw@planets.elm.net>
Sun, 6 Sep 2009 16:06:48 +0000 (18:06 +0200)
committerKern Sibbald <kern@sibbald.com>
Mon, 7 Sep 2009 09:16:14 +0000 (11:16 +0200)
Signed-off-by: Kern Sibbald <kern@sibbald.com>
bacula/src/filed/restore.c

index 4400e14015b26e3fba43ffe783f018b08eeba052..cbb08899919b8ab26592cf5452e12662e0541e3d 100644 (file)
@@ -367,7 +367,6 @@ void do_restore(JCR *jcr)
             rctx.extract = true;
             /* FALLTHROUGH */
          case CF_CREATED:        /* File created, but there is no content */
-            jcr->JobFiles++;
             rctx.fileAddr = 0;
             print_ls_output(jcr, attr);
 
@@ -377,7 +376,17 @@ void do_restore(JCR *jcr)
                if (attr->type == FT_REG && rsrc_len > 0) {
                   rctx.extract = true;
                }
+
+               /*
+                * Count the resource forks not as regular files being restored.
+                */
+               if (rsrc_len == 0) {
+                  jcr->JobFiles++;
+               }
+            } else {
+               jcr->JobFiles++;
             }
+
             if (!rctx.extract) {
                /* set attributes now because file will not be extracted */
                if (jcr->plugin) {