From: Michael Tremer Date: Sat, 26 Aug 2023 09:46:58 +0000 (+0000) Subject: packager: Set the sourcepath as path if no path given X-Git-Tag: 0.9.29~58 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=15128e6571adc46a906479fc447797819d3141d0;p=pakfire.git packager: Set the sourcepath as path if no path given Signed-off-by: Michael Tremer --- diff --git a/src/libpakfire/packager.c b/src/libpakfire/packager.c index 17b8669a2..b3078d1c2 100644 --- a/src/libpakfire/packager.c +++ b/src/libpakfire/packager.c @@ -618,12 +618,13 @@ int pakfire_packager_add(struct pakfire_packager* packager, if (r) goto ERROR; + if (!path) + path = sourcepath; + // Assign a new path for inside the archive - if (path) { - r = pakfire_file_set_path(file, path); - if (r) - goto ERROR; - } + r = pakfire_file_set_path(file, path); + if (r) + goto ERROR; // Call the main function r = pakfire_packager_add_file(packager, file);