]> git.ipfire.org Git - pakfire.git/commitdiff
archive: Open for reading only
authorMichael Tremer <michael.tremer@ipfire.org>
Wed, 31 Aug 2022 15:50:31 +0000 (15:50 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Wed, 31 Aug 2022 15:50:31 +0000 (15:50 +0000)
Before, when we could sign archives, there was the need to write to the
file handle as well...

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/libpakfire/archive.c

index a8ccfc5f9e398c2d92dac5f7c6e31aad352ac3d7..103017843b697a403540a4704f1d889b21efa256 100644 (file)
@@ -577,7 +577,7 @@ static int pakfire_archive_try_open(struct pakfire_archive* archive, const char*
        pakfire_string_set(archive->path, path);
 
        // Open the file (and keep the file descriptor open)
-       archive->f = fopen(archive->path, "r+");
+       archive->f = fopen(archive->path, "r");
        if (!archive->f)
                return 1;