From 8dd0eaddfad501873e0c12e5b39e79bc3586e749 Mon Sep 17 00:00:00 2001 From: Marco van Wieringen Date: Sun, 6 Sep 2009 18:06:48 +0200 Subject: [PATCH] This patch should fix bug #1366 Signed-off-by: Kern Sibbald --- bacula/src/filed/restore.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/bacula/src/filed/restore.c b/bacula/src/filed/restore.c index 4400e14015..cbb0889991 100644 --- a/bacula/src/filed/restore.c +++ b/bacula/src/filed/restore.c @@ -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) { -- 2.39.5