]> git.ipfire.org Git - pakfire.git/commitdiff
stripper: There should be no need to check if the destination exists now
authorMichael Tremer <michael.tremer@ipfire.org>
Sat, 4 Jan 2025 13:33:23 +0000 (13:33 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Sat, 4 Jan 2025 13:33:23 +0000 (13:33 +0000)
We should have performed deduplication.

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

index fa39e00409a7e474cb30b70ba692f1fcb5355711..941da714fc78d9c0adacfeaa1884ecc8f2cbb005 100644 (file)
@@ -289,16 +289,9 @@ static int pakfire_stripper_copy_sources(
        // Open the destination file
        dst = fopen(p, "wx");
        if (!dst) {
-               switch (errno) {
-                       // If the file exist already, we are done
-                       case EEXIST:
-                               goto ERROR;
-
-                       default:
-                               ERROR(stripper->ctx, "Could not open %s: %m\n", p);
-                               r = -errno;
-                               goto ERROR;
-               }
+               ERROR(stripper->ctx, "Could not open %s: %m\n", p);
+               r = -errno;
+               goto ERROR;
        }
 
        // Copy all content