From dc001ccc3af8cdd9f32e36e8ebbeb2b9e7e29289 Mon Sep 17 00:00:00 2001 From: Kern Sibbald Date: Wed, 9 Apr 2003 13:24:46 +0000 Subject: [PATCH] Fix mtime/ctime problem, misc git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@431 91ce42f0-d328-0410-95d8-f526ca767f89 --- bacula/src/filed/restore.c | 2 +- bacula/src/findlib/find.c | 2 +- bacula/src/findlib/match.c | 17 +++++++++++++++++ bacula/src/lib/message.h | 6 +++++- bacula/src/lib/parse_conf.c | 1 + bacula/src/version.h | 4 ++-- 6 files changed, 27 insertions(+), 5 deletions(-) diff --git a/bacula/src/filed/restore.c b/bacula/src/filed/restore.c index c2e1e503d4..864c3bd36f 100644 --- a/bacula/src/filed/restore.c +++ b/bacula/src/filed/restore.c @@ -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); } diff --git a/bacula/src/findlib/find.c b/bacula/src/findlib/find.c index 1afeec0f5b..e26a7fb09d 100644 --- a/bacula/src/findlib/find.c +++ b/bacula/src/findlib/find.c @@ -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); diff --git a/bacula/src/findlib/match.c b/bacula/src/findlib/match.c index fcb59daa0d..8ca68db1a4 100644 --- a/bacula/src/findlib/match.c +++ b/bacula/src/findlib/match.c @@ -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, '/')) { diff --git a/bacula/src/lib/message.h b/bacula/src/lib/message.h index 2d4ae0bef9..4e722f0e0c 100644 --- a/bacula/src/lib/message.h +++ b/bacula/src/lib/message.h @@ -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 */ diff --git a/bacula/src/lib/parse_conf.c b/bacula/src/lib/parse_conf.c index 3e2f77f4eb..a021e1905e 100755 --- a/bacula/src/lib/parse_conf.c +++ b/bacula/src/lib/parse_conf.c @@ -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} }; diff --git a/bacula/src/version.h b/bacula/src/version.h index ccdad15d2a..da58822d23 100644 --- a/bacula/src/version.h +++ b/bacula/src/version.h @@ -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 -- 2.39.5