src/findlib/match.c
int file_is_included(FF_PKT *ff, const char *file)
{
   struct s_included_file *inc = ff->included_files_list;
   int len;

   for ( ; inc; inc=inc->next ) {
      if (inc->pattern) {
         if (fnmatch(inc->fname, file, fnmode|FNM_LEADING_DIR) == 0) {
            return 1;
         }
         continue;
      }
      /*
       * No wild cards. We accept a match to the
       *  end of any component.
       */
      Dmsg2(900, "pat=%s file=%s\n", inc->fname, file);
      len = strlen(file);
      if (inc->len == len && strcmp(inc->fname, file) == 0) {
         return 1;
      }
      if (inc->len < len && IsPathSeparator(file[inc->len]) &&
          strncmp(inc->fname, file, inc->len) == 0) {
         return 1;
      }
      if (inc->len == 1 && IsPathSeparator(inc->fname[0])) {
         return 1;
      }
   }
   return 0;
}
/*
 * Walk through the included list to see if this
 *  file is included possibly with wild-cards.
 */
Walk through the included list to see if this
file is included possibly with wild-cards.
Walk through the included list to see if this file is included possibly with wild - cards .
int file_is_included(FF_PKT *ff, const char *file)
{
   struct s_included_file *inc = ff->included_files_list;
   int len;
   for ( ; inc; inc=inc->next ) {
      if (inc->pattern) {
         if (fnmatch(inc->fname, file, fnmode|FNM_LEADING_DIR) == 0) {
            return 1;
         }
         continue;
      }
      Dmsg2(900, "pat=%s file=%s\n", inc->fname, file);
      len = strlen(file);
      if (inc->len == len && strcmp(inc->fname, file) == 0) {
         return 1;
      }
      if (inc->len < len && IsPathSeparator(file[inc->len]) &&
          strncmp(inc->fname, file, inc->len) == 0) {
         return 1;
      }
      if (inc->len == 1 && IsPathSeparator(inc->fname[0])) {
         return 1;
      }
   }
   return 0;
}
int file_is_included ( FF_PKT * ff , const char * file ) { struct s_included_file * inc = ff -> included_files_list ; int len ; for ( ; inc ; inc = inc -> next ) { if ( inc -> pattern ) { if ( fnmatch ( inc -> fname , file , fnmode | FNM_LEADING_DIR ) == 0 ) { return 1 ; } continue ; } Dmsg2 ( 900 , " \n " , inc -> fname , file ) ; len = strlen ( file ) ; if ( inc -> len == len && strcmp ( inc -> fname , file ) == 0 ) { return 1 ; } if ( inc -> len < len && IsPathSeparator ( file [ inc -> len ] ) && strncmp ( inc -> fname , file , inc -> len ) == 0 ) { return 1 ; } if ( inc -> len == 1 && IsPathSeparator ( inc -> fname [ 0 ] ) ) { return 1 ; } } return 0 ; }
Walk through the included list to see if this
  file is included possibly with wild-cards.
Walk through the included list to see if this file is included possibly with wild - cards .
/*
       * No wild cards. We accept a match to the
       *  end of any component.
       */