- if (!feedfile) feedfile= xasprintf("%s/%s",innconf->pathoutgoing,sitename);
- else assemble_path(&feedfile, "", "feed filename");
-
- if (!path_cli) path_cli= xasprintf("%s_cli", feedfile);
- else assemble_path(&path_cli, "%s_cli", "cli socket path");
+ if (!feedfile) {
+ feedfile= xasprintf("%s/%s",innconf->pathoutgoing,sitename);
+ } else if (!feedfile[0]) {
+ badusage("feed filename, if specified, must be nonempty");
+ } else if (path_ends_slash(feedfile)) {
+ feedfile= xasprintf("%s%s", feedfile, sitename);
+ }
+
+ if (!path_cli) {
+ path_cli_dir= xasprintf("%s/innduct", innconf->pathrun);
+ } else if (!path_cli[0] || !strcmp(path_cli,"none")) {
+ path_cli= 0; /* ok, don't then */
+ } else if (path_ends_slash(path_cli)) {
+ path_cli_dir= xasprintf("%.*s", strlen(path_cli)-1, path_cli);
+ }
+ if (path_cli_dir)
+ path_cli= xasprintf("%s/%s", path_cli_dir, sitename);