From: Michael Tremer Date: Thu, 9 Mar 2023 15:34:35 +0000 (+0000) Subject: repo: compose: Ensure that the destination path always exists X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=0736f78157e35e650b90af5dcff4275834efb9be;p=people%2Fstevee%2Fpakfire.git 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 --- 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)