]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/findlib/find.c
Tweak version date
[bacula/bacula] / bacula / src / findlib / find.c
index f818bae13df280024ceed840d050a85b08060e6e..cf707265f6f9657d2b6abf7047345c613edf6860 100644 (file)
@@ -6,7 +6,7 @@
    The main author of Bacula is Kern Sibbald, with contributions from
    many others, a complete list can be found in the file AUTHORS.
    This program is Free Software; you can redistribute it and/or
-   modify it under the terms of version two of the GNU General Public
+   modify it under the terms of version three of the GNU Affero General Public
    License as published by the Free Software Foundation and included
    in the file LICENSE.
 
@@ -15,7 +15,7 @@
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
    General Public License for more details.
 
-   You should have received a copy of the GNU General Public License
+   You should have received a copy of the GNU Affero General Public License
    along with this program; if not, write to the Free Software
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
@@ -121,10 +121,14 @@ get_win32_driveletters(FF_PKT *ff, char* szDrives)
 #if !defined(HAVE_WIN32)
    return 0;
 #endif
+   int nCount;
+   /* Can be already filled by plugin, so check that everything
+    * is on upper case. TODO: can check for dupplicate?
+    */
+   for (nCount = 0; nCount < 27 && szDrives[nCount] ; nCount++) {
+      szDrives[nCount] = toupper(szDrives[nCount]);
+   }
 
-   szDrives[0] = 0; /* make empty */
-   int nCount = 0;
-    
    findFILESET *fileset = ff->fileset;
    if (fileset) {
       int i;
@@ -188,14 +192,22 @@ find_files(JCR *jcr, FF_PKT *ff, int file_save(JCR *jcr, FF_PKT *ff_pkt, bool to
          for (j=0; j<incexe->opts_list.size(); j++) {
             findFOPTS *fo = (findFOPTS *)incexe->opts_list.get(j);
             ff->flags |= fo->flags;
-            ff->GZIP_level = fo->GZIP_level;
+            ff->Compress_algo = fo->Compress_algo;
+            ff->Compress_level = fo->Compress_level;
             ff->strip_path = fo->strip_path;
             ff->fstypes = fo->fstype;
             ff->drivetypes = fo->drivetype;
+            ff->plugin = fo->plugin; /* TODO: generate a plugin event ? */
+            ff->opt_plugin = (ff->plugin != NULL)? true : false;
             bstrncat(ff->VerifyOpts, fo->VerifyOpts, sizeof(ff->VerifyOpts));
-            bstrncat(ff->AccurateOpts, fo->AccurateOpts, sizeof(ff->AccurateOpts));
-            bstrncat(ff->BaseJobOpts, fo->BaseJobOpts, sizeof(ff->BaseJobOpts));
+            if (fo->AccurateOpts[0]) {
+               bstrncpy(ff->AccurateOpts, fo->AccurateOpts, sizeof(ff->AccurateOpts));
+            }
+            if (fo->BaseJobOpts[0]) {
+               bstrncpy(ff->BaseJobOpts, fo->BaseJobOpts, sizeof(ff->BaseJobOpts));
+            }
          }
+         Dmsg3(50, "Verify=<%s> Accurate=<%s> BaseJob=<%s>\n", ff->VerifyOpts, ff->AccurateOpts, ff->BaseJobOpts);
          dlistString *node;
          foreach_dlist(node, &incexe->name_list) {
             char *fname = node->c_str();
@@ -291,7 +303,8 @@ static bool accept_file(FF_PKT *ff)
    for (j = 0; j < incexe->opts_list.size(); j++) {
       findFOPTS *fo = (findFOPTS *)incexe->opts_list.get(j);
       ff->flags = fo->flags;
-      ff->GZIP_level = fo->GZIP_level;
+      ff->Compress_algo = fo->Compress_algo;
+      ff->Compress_level = fo->Compress_level;
       ff->fstypes = fo->fstype;
       ff->drivetypes = fo->drivetype;
 
@@ -436,7 +449,6 @@ static int our_callback(JCR *jcr, FF_PKT *ff, bool top_level)
    case FT_INVALIDFS:
    case FT_INVALIDDT:
    case FT_NOOPEN:
-   case FT_REPARSE:
 //    return ff->file_save(jcr, ff, top_level);
 
    /* These items can be filtered */
@@ -450,6 +462,8 @@ static int our_callback(JCR *jcr, FF_PKT *ff, bool top_level)
    case FT_FIFO:
    case FT_SPEC:
    case FT_DIRNOCHG:
+   case FT_REPARSE:
+   case FT_JUNCTION:
       if (accept_file(ff)) {
          return ff->file_save(jcr, ff, top_level);
       } else {