]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/dird/ua_restore.c
Fix line I accidently truncated
[bacula/bacula] / bacula / src / dird / ua_restore.c
index b20fb4b9f382beb4e1fdd7c9e2515d2989f4d3b9..420931d5f190bee571778c2b16388c43427079ac 100644 (file)
@@ -100,7 +100,7 @@ int restore_cmd(UAContext *ua, const char *cmd)
       }
    }
 
-   if (!open_db(ua)) {
+   if (!open_client_db(ua)) {
       goto bail_out;
    }
 
@@ -179,7 +179,7 @@ int restore_cmd(UAContext *ua, const char *cmd)
 
    get_client_name(ua, &rx);
    if (!rx.ClientName) {
-      bsendmsg(ua, _("No Restore Job resource found!\n"));
+      bsendmsg(ua, _("No Client resource found!\n"));
       goto bail_out;
    }
 
@@ -613,7 +613,7 @@ static int user_select_jobids_or_files(UAContext *ua, RESTORE_CTX *rx)
                break;
             }
             /* Add trailing slash to end of directory names */
-            if (ua->cmd[0] != '<' && ua->cmd[len-1] != '/') {
+            if (ua->cmd[0] != '<' && !IsPathSeparator(ua->cmd[len-1])) {
                strcat(ua->cmd, "/");
             }
             insert_one_file_or_dir(ua, rx, date, true);
@@ -825,11 +825,11 @@ static void split_path_and_filename(RESTORE_CTX *rx, char *name)
     * must be a path name (e.g. c:).
     */
    for (p=f=name; *p; p++) {
-      if (*p == '/') {
+      if (IsPathSeparator(*p)) {
          f = p;                       /* set pos of last slash */
       }
    }
-   if (*f == '/') {                   /* did we find a slash? */
+   if (IsPathSeparator(*f)) {         /* did we find a slash? */
       f++;                            /* yes, point to filename */
    } else {                           /* no, whole thing must be path name */
       f = p;
@@ -1037,6 +1037,7 @@ static bool select_backups_before_date(UAContext *ua, RESTORE_CTX *rx, char *dat
       }
       if (do_prompt(ua, _("FileSet"), _("Select FileSet resource"),
                  fileset_name, sizeof(fileset_name)) < 0) {
+         bsendmsg(ua, _("No FileSet found for client \"%s\".\n"), cr.Name);
          goto bail_out;
       }