From 1aa8d5b267e6ae0918303cb940c343aafe738ca1 Mon Sep 17 00:00:00 2001 From: Michael Tremer Date: Tue, 6 Dec 2022 12:30:06 +0000 Subject: [PATCH] filelist: Always prefer excludes first, then includes Signed-off-by: Michael Tremer --- src/libpakfire/filelist.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/libpakfire/filelist.c b/src/libpakfire/filelist.c index e63a87f72..a3722f31a 100644 --- a/src/libpakfire/filelist.c +++ b/src/libpakfire/filelist.c @@ -264,15 +264,6 @@ int pakfire_filelist_scan(struct pakfire_filelist* list, const char* root, if (!path || !*path) continue; - // Skip what is not included - if (includes && !pakfire_filelist_match_patterns(path, includes)) { - DEBUG(list->pakfire, "Skipping %s...\n", path); - - // We do not mark the whole tree as to skip because some matches might - // look for file extensions, etc. - continue; - } - // Skip excludes if (excludes && pakfire_filelist_match_patterns(path, excludes)) { DEBUG(list->pakfire, "Skipping %s...\n", path); @@ -284,6 +275,15 @@ int pakfire_filelist_scan(struct pakfire_filelist* list, const char* root, continue; } + // Skip what is not included + if (includes && !pakfire_filelist_match_patterns(path, includes)) { + DEBUG(list->pakfire, "Skipping %s...\n", path); + + // We do not mark the whole tree as to skip because some matches might + // look for file extensions, etc. + continue; + } + DEBUG(list->pakfire, "Processing %s...\n", path); // Reset the file entry -- 2.39.5