From: Eric Bollengier Date: Wed, 8 Dec 2021 13:37:42 +0000 (+0100) Subject: Fix .status storage output X-Git-Tag: Beta-15.0.0~724 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cc199d71b0a7a4a7801a158e28aa35b1f5133296;p=thirdparty%2Fbacula.git Fix .status storage output --- diff --git a/bacula/src/lib/output.c b/bacula/src/lib/output.c index 3fa9004f0..8f5029d9c 100644 --- a/bacula/src/lib/output.c +++ b/bacula/src/lib/output.c @@ -234,6 +234,15 @@ char *OutputWriter::start_list(const char *name, bool append) will_need_separator = false; } else { + if (*buf) { + int l = strlen(buf); + if (buf[l - 1] != separator) { + char ed1[2]; + ed1[0] = separator; + ed1[1] = '\0'; + pm_strcat(buf, ed1); + } + } pm_strcat(buf, name); pm_strcat(buf, ": [\n"); }