From: Michael Tremer Date: Thu, 27 Mar 2025 18:07:57 +0000 (+0000) Subject: file: Don't try to resolve paths relative to Pakfire in stub mode X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=0df6b9bb27c0ac1e388aec15e3adeab9f14b8f73;p=pakfire.git file: Don't try to resolve paths relative to Pakfire in stub mode Signed-off-by: Michael Tremer --- diff --git a/src/pakfire/file.c b/src/pakfire/file.c index 35e47af5..5323e0c5 100644 --- a/src/pakfire/file.c +++ b/src/pakfire/file.c @@ -806,13 +806,16 @@ int pakfire_file_set_path(struct pakfire_file* file, const char* path) { // Store the path archive_entry_set_pathname(file->entry, buffer); - // Make the absolute path - r = pakfire_path(file->pakfire, buffer, "%s", buffer); - if (r < 0) - return r; + // Store the absolute path only when not in stub mode + if (!pakfire_has_flag(file->pakfire, PAKFIRE_FLAGS_STUB)) { + // Make the absolute path + r = pakfire_path(file->pakfire, buffer, "%s", buffer); + if (r < 0) + return r; - // Store the abspath - archive_entry_copy_sourcepath(file->entry, buffer); + // Store the abspath + archive_entry_copy_sourcepath(file->entry, buffer); + } return 0; }