]> git.ipfire.org Git - pakfire.git/commitdiff
build: Ensure /etc/pakfire/repos exists before writing files
authorMichael Tremer <michael.tremer@ipfire.org>
Fri, 9 Dec 2022 16:21:59 +0000 (16:21 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Fri, 9 Dec 2022 16:21:59 +0000 (16:21 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/libpakfire/build.c

index bbd2cee172909e1bac3b9e9d4ee1074a60d9a198..f3b61f07b118077fb0a4d2c830f7d03f65b7b0e0 100644 (file)
@@ -127,6 +127,11 @@ static int __pakfire_build_setup_repo(struct pakfire* pakfire,
                goto ERROR;
        }
 
+       // Create the parent directory
+       r = pakfire_mkparentdir(path, 0755);
+       if (r)
+               goto ERROR;
+
        // Open the repository configuration
        f = fopen(path, "w");
        if (!f) {