]> git.sur5r.net Git - bacula/bacula/commitdiff
Fix mtime/ctime problem, misc
authorKern Sibbald <kern@sibbald.com>
Wed, 9 Apr 2003 13:24:46 +0000 (13:24 +0000)
committerKern Sibbald <kern@sibbald.com>
Wed, 9 Apr 2003 13:24:46 +0000 (13:24 +0000)
git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@431 91ce42f0-d328-0410-95d8-f526ca767f89

bacula/src/filed/restore.c
bacula/src/findlib/find.c
bacula/src/findlib/match.c
bacula/src/lib/message.h
bacula/src/lib/parse_conf.c
bacula/src/version.h

index c2e1e503d4410ea7b5deeb39927a16472c9cca06..864c3bd36f1d2211777c1ac212400a19500d732d 100644 (file)
@@ -448,5 +448,5 @@ static void print_ls_output(JCR *jcr, char *fname, char *lname, int type, struct
    *p++ = '\n';
    *p = 0;
    Dmsg0(20, buf);
-   Jmsg(jcr, M_INFO, 0, "%s", buf);
+   Jmsg(jcr, M_RESTORED, 0, "%s", buf);
 }
index 1afeec0f5b58c8b2a21a516611bfdf687ca58842..e26a7fb09d4347f92c69424cbb6a5cd9fff1f299 100644 (file)
@@ -51,7 +51,7 @@ FF_PKT *init_find_files()
   ff->sys_fname = get_pool_memory(PM_FNAME);
 
   init_include_exclude_files(ff);          /* init lists */
-  ff->mtime_only = 1;
+  ff->mtime_only = 0;                      /* use both st_mtime and st_ctime */
 
    /* Get system path and filename maximum lengths */
    path_max = pathconf(".", _PC_PATH_MAX);
index fcb59daa0d778e1c05c789b6e8e34ff6e5bbc519..8ca68db1a40bfd28c4fb94a7ea4ebde10bf7ed75 100644 (file)
@@ -158,6 +158,7 @@ void add_fname_to_include_list(FF_PKT *ff, int prefixed, char *fname)
    }
 
    strcpy(inc->fname, p);                
+   p = inc->fname;
    len = strlen(p);
    /* Zap trailing slashes.  */
    p += len - 1;
@@ -174,6 +175,14 @@ void add_fname_to_include_list(FF_PKT *ff, int prefixed, char *fname)
         break;
       }
    }
+#ifdef HAVE_CYGWIN
+   /* Convert any \'s into /'s */
+   for (p=inc->fname; *p; p++) {
+      if (*p == '\\') {
+         *p = '/';
+      }
+   }
+#endif
    inc->next = NULL;
    /* Chain this one on the end of the list */
    if (!ff->included_files_list) {
@@ -198,6 +207,14 @@ void add_fname_to_exclude_list(FF_PKT *ff, char *fname)
    int len;
    struct s_excluded_file *exc, **list;
 
+#ifdef HAVE_CYGWIN
+   /* Convert any \'s into /'s */
+   for (char *p=fname; *p; p++) {
+      if (*p == '\\') {
+         *p = '/';
+      }
+   }
+#endif
    Dmsg1(20, "Add name to exclude: %s\n", fname);
 
    if (strchr(fname, '/')) {
index 2d4ae0bef919320adebae4ba92f7e3a03916ced5..4e722f0e0c90c9078e226d0203f89e52f5d1ef58 100644 (file)
@@ -35,6 +35,7 @@
 #undef  M_MOUNT
 #undef  M_ERROR_TERM
 #undef  M_TERM
+#undef  M_RESTORED
 
 /*
  * Most of these message levels are more or less obvious. 
@@ -58,6 +59,8 @@
  *  M_WARNING     Job warning message.
  *  M_INFO        Job information message.
  *
+ *  M_RESTORED    An ls -l of each restored file.
+ *
  */
 
 #define M_DEBUG       1               /* debug message */
@@ -72,8 +75,9 @@
 #define M_MOUNT      10               /* Mount requests */
 #define M_ERROR_TERM 11               /* Error termination request (no dump) */
 #define M_TERM       12               /* Terminating daemon */
+#define M_RESTORED   13               /* ls -l of restored files */
 
-#define M_MAX      M_TERM             /* keep this updated ! */
+#define M_MAX      M_RESTORED         /* keep this updated ! */
 
 /* Define message destination structure */
 /* *** FIXME **** where should be extended to handle multiple values */
index 3e2f77f4eb67906cfec328141ea196aada9e36d3..a021e1905ea5c79865e36bdab13567f1a669c838 100755 (executable)
@@ -115,6 +115,7 @@ static struct s_mtypes msg_types[] = {
    {"skipped",       M_SKIPPED},
    {"mount",         M_MOUNT},
    {"terminate",     M_TERM},
+   {"restored",      M_RESTORED},
    {"all",           M_MAX+1},
    {NULL,           0}
 };
index ccdad15d2a6d7e86305e51ba74e3c22719019c27..da58822d2350774e0b9bd86fe92df7df897e5016 100644 (file)
@@ -1,8 +1,8 @@
 /* */
 #define VERSION "1.30"
 #define VSTRING "1"
-#define BDATE   "07 April 2003"
-#define LSMDATE "07Apr03"
+#define BDATE   "09 April 2003"
+#define LSMDATE "09Apr03"
 
 /* Debug flags */
 #define DEBUG 1