// When recursing into directories, do not want to check the include_ext list. static int file_is_included_no_incext(struct conf *conf, const char *fname) { int ret=0; int longest=0; int matching=0; struct strlist *l=NULL; struct strlist *best=NULL; if(in_exclude_ext(conf->excext, fname) || in_exclude_regex(conf->excreg, fname)) return 0; // Check include/exclude directories. for(l=conf->incexcdir; l; l=l->next) { //logp("try: %d %s\n", i, l->path); matching=is_subdir(l->path, fname); if(matching>longest) { longest=matching; best=l; } } //logp("best: %d\n", best); if(!best) ret=0; else ret=best->flag; //logp("return: %d\n", ret); return ret; }
// When recursing into directories, do not want to check the include_ext list. static int file_is_included_no_incext(struct conf **confs, const char *fname) { int ret=0; int longest=0; int matching=0; struct strlist *l=NULL; struct strlist *best=NULL; if(in_exclude_ext(get_strlist(confs[OPT_EXCEXT]), fname) || in_exclude_regex(get_strlist(confs[OPT_EXCREG]), fname)) return 0; // Check include/exclude directories. for(l=get_strlist(confs[OPT_INCEXCDIR]); l; l=l->next) { matching=is_subdir(l->path, fname); if(matching>longest) { longest=matching; best=l; } } if(!best) ret=0; else ret=best->flag; return ret; }