From 0736f78157e35e650b90af5dcff4275834efb9be Mon Sep 17 00:00:00 2001 From: Michael Tremer Date: Thu, 9 Mar 2023 15:34:35 +0000 Subject: [PATCH] repo: compose: Ensure that the destination path always exists realpath() fails if the destination does not exist, so we will try to create it before. Signed-off-by: Michael Tremer --- src/libpakfire/repo.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/libpakfire/repo.c b/src/libpakfire/repo.c index bd467cce..74ea6f57 100644 --- a/src/libpakfire/repo.c +++ b/src/libpakfire/repo.c @@ -1522,6 +1522,9 @@ PAKFIRE_EXPORT int pakfire_repo_compose(struct pakfire* pakfire, const char* pat num_files++; } + // Create the destination if it doesn't exist, yet + pakfire_mkdir(path, 0755); + // Make path absolute r = pakfire_path_realpath(realpath, path); if (r) -- 2.47.3