- findINCEXE *incexe = (findINCEXE *)fileset->include_list.get(i);
- fileset->incexe = incexe;
- /*
- * By setting all options, we in effect or the global options
- * which is what we want.
- */
- 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->fstypes = &(fo->fstype);
- bstrncat(ff->VerifyOpts, fo->VerifyOpts, sizeof(ff->VerifyOpts));
- }
- for (j=0; j<incexe->name_list.size(); j++) {
- Dmsg1(100, "F %s\n", (char *)incexe->name_list.get(j));
- char *fname = (char *)incexe->name_list.get(j);
- if (find_one_file(jcr, ff, our_callback, his_pkt, fname, (dev_t)-1, 1) == 0) {
- return 0; /* error return */
- }
- }
- }
- } else {
- struct s_included_file *inc = NULL;
-
- /* This is the old deprecated way */
- while (!job_canceled(jcr) && (inc = get_next_included_file(ff, inc))) {
- /* Copy options for this file */
- bstrncat(ff->VerifyOpts, inc->VerifyOpts, sizeof(ff->VerifyOpts));
- Dmsg1(100, "find_files: file=%s\n", inc->fname);
- if (!file_is_excluded(ff, inc->fname)) {
- if (find_one_file(jcr, ff, callback, his_pkt, inc->fname, (dev_t)-1, 1) ==0) {
- return 0; /* error return */
- }
- }
+ findINCEXE *incexe = (findINCEXE *)fileset->include_list.get(i);
+ fileset->incexe = incexe;
+ /*
+ * By setting all options, we in effect or the global options
+ * which is what we want.
+ */
+ 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->strip_path = fo->strip_path;
+ ff->fstypes = fo->fstype;
+ ff->drivetypes = fo->drivetype;
+ bstrncat(ff->VerifyOpts, fo->VerifyOpts, sizeof(ff->VerifyOpts));
+ }
+ dlistString *node;
+ foreach_dlist(node, &incexe->name_list) {
+ char *fname = node->c_str();
+ Dmsg1(100, "F %s\n", fname);
+ ff->top_fname = fname;
+ if (find_one_file(jcr, ff, our_callback, his_pkt, ff->top_fname, (dev_t)-1, true) == 0) {
+ return 0; /* error return */
+ }
+ }
+ foreach_dlist(node, &incexe->plugin_list) {
+ char *fname = node->c_str();
+ Dmsg1(100, "PluginCommand: %s\n", fname);
+ ff->top_fname = fname;
+ ff->cmd_plugin = true;
+ generate_plugin_event(jcr, bEventPluginCommand, (void *)fname);
+ ff->cmd_plugin = false;
+ }