]> 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)
committerEric Bollengier <eric@eb.homelinux.org>
Thu, 10 Sep 2009 12:48:42 +0000 (14:48 +0200)
bacula/src/filed/restore.c

index 5a5cc9e84af01e5547013a73fc3f385272176fb3..e8d1ca609fd90911e55e0376dd478744268fc0c0 100644 (file)
@@ -363,7 +363,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);
 
@@ -373,7 +372,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) {