]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/filed/restore.c
This patch should fix bug #1366
[bacula/bacula] / 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) {