]> git.ipfire.org Git - pakfire.git/commitdiff
compress: Avoid prepending "(null)" to paths on extraction
authorMichael Tremer <michael.tremer@ipfire.org>
Fri, 9 Sep 2022 16:21:37 +0000 (16:21 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Fri, 9 Sep 2022 16:21:37 +0000 (16:21 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/libpakfire/compress.c

index ae84c24378bc1f89bdce3950759adef2cf543f44..3eefcea1881cc3470cc82e45f22168b679a3b049 100644 (file)
@@ -756,6 +756,10 @@ int pakfire_extract(struct pakfire* pakfire, struct archive* archive,
                const char* prefix, const char* message, int flags) {
        int r = 1;
 
+       // Use an empty string if no prefix set
+       if (!prefix)
+               prefix = "";
+
        struct pakfire_extract data = {
                .pakfire  = pakfire,
                .archive  = archive,