/*
Bacula® - The Network Backup Solution
- Copyright (C) 2000-2008 Free Software Foundation Europe e.V.
+ Copyright (C) 2000-2009 Free Software Foundation Europe e.V.
The main author of Bacula is Kern Sibbald, with contributions from
many others, a complete list can be found in the file AUTHORS.
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301, USA.
- Bacula® is a registered trademark of John Walker.
+ Bacula® is a registered trademark of Kern Sibbald.
The licensor of Bacula is the Free Software Foundation Europe
(FSFE), Fiduciary Program, Sumatrastrasse 25, 8006 Zürich,
Switzerland, email:ftf@fsfeurope.org.
void
set_find_changed_function(FF_PKT *ff, bool check_fct(JCR *jcr, FF_PKT *ff))
{
- Dmsg0(1, "Enter set_find_changed_function()\n");
+ Dmsg0(100, "Enter set_find_changed_function()\n");
ff->check_fct = check_fct;
}
ff->flags = 0;
ff->VerifyOpts[0] = 'V';
ff->VerifyOpts[1] = 0;
+ strcpy(ff->AccurateOpts, "C:mcs"); /* mtime+ctime+size by default */
for (i=0; i<fileset->include_list.size(); i++) {
findINCEXE *incexe = (findINCEXE *)fileset->include_list.get(i);
fileset->incexe = incexe;
ff->fstypes = fo->fstype;
ff->drivetypes = fo->drivetype;
bstrncat(ff->VerifyOpts, fo->VerifyOpts, sizeof(ff->VerifyOpts));
+ bstrncat(ff->AccurateOpts, fo->AccurateOpts, sizeof(ff->AccurateOpts));
}
dlistString *node;
foreach_dlist(node, &incexe->name_list) {
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;
+ }
+ }
+ }
+ 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(100, "Exc fname=%s ff->fname=%s\n", fname, ff->fname);
+ if (strcmp(fname, ff->fname) == 0) {
+ return true;
+ }
+ }
+ }
+ }
+ return false;
+}
+
+
static bool accept_file(FF_PKT *ff)
{
int i, j, k;
findFOPTS *fo = (findFOPTS *)incexe->opts_list.get(j);
ff->flags = fo->flags;
ff->GZIP_level = fo->GZIP_level;
+ ff->ignoredir = fo->ignoredir;
ff->fstypes = fo->fstype;
ff->drivetypes = fo->drivetype;