]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/dird/ua_run.c
kes Fix %g in filename returned by SQL for browse tree reported by
[bacula/bacula] / bacula / src / dird / ua_run.c
index 017226873bdd5b2ba432def2209ef70f7776b70f..5baf9d9c6a03e182defef81187f8da33c5b9726d 100644 (file)
@@ -7,8 +7,8 @@
    many others, a complete list can be found in the file AUTHORS.
    This program is Free Software; you can redistribute it and/or
    modify it under the terms of version two of the GNU General Public
-   License as published by the Free Software Foundation plus additions
-   that are listed in the file LICENSE.
+   License as published by the Free Software Foundation and included
+   in the file LICENSE.
 
    This program is distributed in the hope that it will be useful, but
    WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -211,7 +211,6 @@ try_again:
       if (ReplaceOptions[i].token == jcr->replace) {
          rc.replace = ReplaceOptions[i].name;
       }
-      rc.replace = NULL;
    }
    if (rc.level_name) {
       if (!get_level_from_name(jcr, rc.level_name)) {
@@ -244,7 +243,8 @@ try_again:
       goto bail_out;
    }
 
-   if (ua->cmd[0] == '.' && strncasecmp(ua->cmd, ".mod ", 5) == 0) {
+   if (strncasecmp(ua->cmd, ".mod ", 5) == 0 || 
+       (strncasecmp(ua->cmd, "mod ", 4) == 0 && strlen(ua->cmd) > 6)) {
       Dmsg1(000, "got: %s\n", ua->cmd);
       parse_ua_args(ua);
       rc.mod = true;
@@ -1209,7 +1209,7 @@ static bool scan_command_line_arguments(UAContext *ua, run_ctx &rc)
    }
    if (!rc.store->store) {
       ua->error_msg(_("No storage specified.\n"));
-      return true;
+      return false;
    } else if (!acl_access_ok(ua, Storage_ACL, rc.store->store->name())) {
       ua->error_msg(_("No authorization. Storage \"%s\".\n"),
                rc.store->store->name());