]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/findlib/find.c
kes Apply doc fix from bug #1062.
[bacula/bacula] / bacula / src / findlib / find.c
index c231115a6ad775636d2cb100cdabf3279c9d23fe..7e059e4b2281b5dca5c21a909a55f45e3f3f9b97 100644 (file)
@@ -96,6 +96,13 @@ set_find_options(FF_PKT *ff, int incremental, time_t save_time)
   Dmsg0(100, "Leave set_find_options()\n");
 }
 
+void
+set_find_changed_function(FF_PKT *ff, bool check_fct(JCR *jcr, FF_PKT *ff))
+{
+   Dmsg0(100, "Enter set_find_changed_function()\n");
+   ff->check_fct = check_fct;
+}
+
 /*
  * For VSS we need to know which windows drives
  * are used, because we create a snapshot of all used
@@ -208,6 +215,46 @@ find_files(JCR *jcr, FF_PKT *ff, int file_save(JCR *jcr, FF_PKT *ff_pkt, bool to
    return 1;
 }
 
+/*
+ * Test if the currently selected directory (in ff->fname) is
+ *  explicitly in the Include list or explicitly in the Exclude 
+ *  list.
+ */
+bool is_in_fileset(FF_PKT *ff)
+{
+   dlistString *node;
+   char *fname;
+   int i;
+   findINCEXE *incexe;
+   findFILESET *fileset = ff->fileset;
+   if (fileset) {
+      for (i=0; i<fileset->include_list.size(); i++) {
+         incexe = (findINCEXE *)fileset->include_list.get(i);
+         foreach_dlist(node, &incexe->name_list) {
+            fname = node->c_str();
+            Dmsg2(100, "Inc fname=%s ff->fname=%s\n", fname, ff->fname);
+            if (strcmp(fname, ff->fname) == 0) {
+               return true;
+            }
+         }
+      }
+#ifdef xxx
+      for (i=0; i<fileset->exclude_list.size(); i++) {
+         incexe = (findINCEXE *)fileset->exclude_list.get(i);
+         foreach_dlist(node, &incexe->name_list) {
+            fname = node->c_str();
+            Dmsg2(000, "Exc fname=%s ff->fname=%s\n", fname, ff->fname);
+            if (strcmp(fname, ff->fname) == 0) {
+               return true;
+            }
+         }
+      }
+#endif
+   }
+   return false;
+}
+
+
 static bool accept_file(FF_PKT *ff)
 {
    int i, j, k;