]> git.ipfire.org Git - thirdparty/bacula.git/commitdiff
Fix error on .ls when plugin name without ':'
authorRadosław Korzeniewski <radekk@inteos.pl>
Mon, 28 Oct 2019 15:34:31 +0000 (16:34 +0100)
committerRadosław Korzeniewski <radekk@inteos.pl>
Sat, 14 Dec 2019 14:57:40 +0000 (15:57 +0100)
Closes #0005548 and #0005549.

bacula/src/dird/fd_cmds.c

index ce594a6cd07aeb211023ddf9c86f7c179347bc05..3fd03688c067717e132588973697c4815fa98a2d 100644 (file)
@@ -632,7 +632,7 @@ bool send_include_list(JCR *jcr)
 }
 
 /*
- * Send a include list with a plugin and listing=<path> parameter
+ * Send an include list with a plugin and listing=<path> parameter
  */
 bool send_ls_plugin_fileset(JCR *jcr, const char *plugin, const char *path)
 {
@@ -642,7 +642,7 @@ bool send_ls_plugin_fileset(JCR *jcr, const char *plugin, const char *path)
    fd->fsend("I\n");
    fd->fsend("O h\n");         /* is it required? */
    fd->fsend("N\n");
-   fd->fsend("P %s listing=%s\n", plugin, path);
+   fd->fsend("P %s%s listing=%s\n", plugin, strchr(plugin, ':') == NULL ? ":" : "", path);
    fd->fsend("N\n");
    fd->signal(BNET_EOD);              /* end of data */