From: Michael Tremer Date: Thu, 30 Jan 2025 22:20:37 +0000 (+0000) Subject: repo: Actually copy files to the right place X-Git-Tag: 0.9.30~233 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=ee20ebd9852e447b9c6b6c94b702e0ed2ad77cf2;p=pakfire.git repo: Actually copy files to the right place Signed-off-by: Michael Tremer --- diff --git a/src/pakfire/repo.c b/src/pakfire/repo.c index 516d905c..5dae617c 100644 --- a/src/pakfire/repo.c +++ b/src/pakfire/repo.c @@ -444,7 +444,6 @@ int __pakfire_repo_make_path(struct pakfire_repo* self, char* path, size_t lengt int pakfire_repo_import_archive(struct pakfire_repo* self, struct pakfire_archive* archive, struct pakfire_package** package) { struct pakfire_package* pkg = NULL; - char path[PATH_MAX]; int r; // This only works on internal or local repositories @@ -458,11 +457,11 @@ int pakfire_repo_import_archive(struct pakfire_repo* self, // Fetch package path const char* arc_path = pakfire_archive_get_path(archive); - const char* pkg_path = pakfire_package_get_path(pkg); + const char* pkg_path = pakfire_package_get_string(pkg, PAKFIRE_PKG_PATH); // Copy (or link) the archive if (!pakfire_string_equals(arc_path, pkg_path)) { - r = pakfire_archive_link_or_copy(archive, path); + r = pakfire_archive_link_or_copy(archive, pkg_path); if (r < 0) goto ERROR; }