]> git.sur5r.net Git - bacula/bacula/commitdiff
ebl Fix #955 bug which was introduce with regexwhere relocation.
authorEric Bollengier <eric@eb.homelinux.org>
Thu, 20 Sep 2007 07:15:31 +0000 (07:15 +0000)
committerEric Bollengier <eric@eb.homelinux.org>
Thu, 20 Sep 2007 07:15:31 +0000 (07:15 +0000)
git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@5601 91ce42f0-d328-0410-95d8-f526ca767f89

bacula/src/dird/restore.c
bacula/technotes-2.3

index 978f81476a985f3d8d31760b8cd6940719c0015c..2c3b213baeecd35153aaa90fa38bed7ac867c9fd 100644 (file)
@@ -173,7 +173,7 @@ bool do_restore(JCR *jcr)
    }
 
    /* Send restore command */
-   char replace, *where, *cmd=NULL;
+   char replace, *where, *cmd;
    char empty = '\0';
 
    if (jcr->replace != 0) {
@@ -184,13 +184,11 @@ bool do_restore(JCR *jcr)
       replace = REPLACE_ALWAYS;       /* always replace */
    }
    
-   where = &empty;                    /* default */
-
    if (jcr->RegexWhere) {
       where = jcr->RegexWhere;             /* override */
       cmd = restorecmdR;
    } else if (jcr->job->RegexWhere) {
-      where = jcr->job->RegexWhere; /* no override take from job */
+      where = jcr->job->RegexWhere;   /* no override take from job */
       cmd = restorecmdR;
 
    } else if (jcr->where) {
@@ -199,7 +197,11 @@ bool do_restore(JCR *jcr)
    } else if (jcr->job->RestoreWhere) {
       where = jcr->job->RestoreWhere; /* no override take from job */
       cmd = restorecmd;
-   } 
+
+   } else {                          /* nothing was specified */
+      where = &empty;                /* use default */
+      cmd   = restorecmd;                   
+   }
    
    jcr->prefix_links = jcr->job->PrefixLinks;
 
index 39d628241b8aa942838a97c927d3c70bc31384fe..f193bec0710ee97e7f62aa6d3b9dfb10ac6ab06a 100644 (file)
@@ -1,6 +1,8 @@
               Technical notes on version 2.3
 
 General:
+20Sep07
+ebl  Fix #955 bug which was introduce with regexwhere relocation.
 17Sep07
 ebl  Add an option to operate on all pools with update vol parameters.
      This complete the project 20. Patch from Nigel Stepp.