]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/dird/ua_tree.c
kes Update copyright date in program files, and for the most part
[bacula/bacula] / bacula / src / dird / ua_tree.c
index 4011f18a54972c1bc77516a1cc437584bb22fb17..606ad9bbba999df8c4b0c4f5fcfb3d8259c05d45 100644 (file)
@@ -9,7 +9,7 @@
  *   Version $Id$
  */
 /*
-   Copyright (C) 2002-2005 Kern Sibbald
+   Copyright (C) 2002-2006 Kern Sibbald
 
    This program is free software; you can redistribute it and/or
    modify it under the terms of the GNU General Public License
@@ -109,7 +109,8 @@ bool user_select_files_from_tree(TREE_CTX *tree)
       }
       parse_ua_args(ua);
       if (ua->argc == 0) {
-         break;
+         bsendmsg(tree->ua, _("Illegal command. Enter \"done\" to exit.\n"));
+         continue;
       }
 
       len = strlen(ua->argk[0]);
@@ -472,6 +473,7 @@ static void ls_output(char *buf, const char *fname, const char *tag,
    char ec1[30];
    char en1[30], en2[30];
    int n;
+   time_t time;
 
    p = encode_mode(statp->st_mode, buf);
    if (dot_cmd) {
@@ -483,7 +485,7 @@ static void ls_output(char *buf, const char *fname, const char *tag,
       p += n;
       n = sprintf(p, "%s,", edit_uint64(statp->st_size, ec1));
       p += n;
-      p = encode_time(statp->st_ctime, p);
+      p = encode_time(statp->st_mtime, p);
       *p++ = ',';
       *p++ = *tag;
       *p++ = ',';
@@ -495,7 +497,13 @@ static void ls_output(char *buf, const char *fname, const char *tag,
       p += n;
       n = sprintf(p, "%10.10s  ", edit_uint64(statp->st_size, ec1));
       p += n;
-      p = encode_time(statp->st_ctime, p);
+      if (statp->st_ctime > statp->st_mtime) {
+         time = statp->st_ctime;
+      } else {
+         time = statp->st_mtime;
+      }
+      /* Display most recent time */
+      p = encode_time(time, p);
       *p++ = ' ';
       *p++ = *tag;
    }