From: Eric Bollengier Date: Tue, 29 Jun 2021 16:43:15 +0000 (+0200) Subject: Fix org#2623 About .ls/estimate command not printing files correctly X-Git-Tag: Release-11.0.6~128 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4200330b64a214ddbac0e26488a7b8d5422f9587;p=thirdparty%2Fbacula.git Fix org#2623 About .ls/estimate command not printing files correctly In my Messages resource in FD config I don't have 'Restored' flag set: Messages { Name = "Standard" Director = darkstar-dir = Info, Warning, Error, Fatal, Terminate, Saved, Security, Alert } In bacula/src/lib/attr.c:259 in print_ls_output() we have the following condition: /* No need to compute everything if it's not required */ if (!chk_dbglvl(dbglvl) && !is_message_type_set(jcr, message_type)) { return; } The dbglvl is set to 150 and message_type default is set to M_RESTORED. With my FD configuration this condition was true but when I set debug level > 150 the condition was false and .ls listing started working. The workaround is to set Restored flag in the FD config in the Director messages resource. --- diff --git a/bacula/src/filed/estimate.c b/bacula/src/filed/estimate.c index caed7f3ec..db626d210 100644 --- a/bacula/src/filed/estimate.c +++ b/bacula/src/filed/estimate.c @@ -110,7 +110,7 @@ static int tally_file(JCR *jcr, FF_PKT *ff_pkt, bool top_level) attr.type = ff_pkt->type; attr.ofname = (POOLMEM *)ff_pkt->fname; attr.olname = (POOLMEM *)ff_pkt->link; - print_ls_output(jcr, &attr); + print_ls_output(jcr, &attr, M_INFO); } /* TODO: Add loop over jcr->file_list to get Accurate deleted files*/ return 1;