]> git.ipfire.org Git - pakfire.git/commitdiff
filelist: Fix return code when we run out of buffer space
authorMichael Tremer <michael.tremer@ipfire.org>
Sun, 29 Dec 2024 17:09:38 +0000 (17:09 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Sun, 29 Dec 2024 17:09:38 +0000 (17:09 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/libpakfire/filelist.c

index 577b7f4b2a6a62507193f4414a923c65a6c84d42..fc9e586cbea43dbb79b8b6c33c01a1d893223d58 100644 (file)
@@ -264,8 +264,8 @@ static int pakfire_filelist_match_patterns(const char* path,
 
                        // Try to match any sub-directories and files
                        r = pakfire_string_format(buffer, "%s/**", *pattern);
-                       if (r)
-                               return 1;
+                       if (r < 0)
+                               return r;
 
                        if (pakfire_path_match(buffer, path))
                                return 1;