unlink() before writing RPM
authormarc <devnull@localhost>
Sun, 24 May 1998 22:38:40 +0000 (22:38 +0000)
committermarc <devnull@localhost>
Sun, 24 May 1998 22:38:40 +0000 (22:38 +0000)
CVS patchset: 2125
CVS date: 1998/05/24 22:38:40

build/pack.c

index ed16dde..0855d17 100644 (file)
@@ -201,6 +201,7 @@ static int writeRPM(Header header, char *fileName, int type,
     close(fd);
 
     /* Open the output file */
+    unlink(fileName);
     if ((fd = open(fileName, O_WRONLY|O_CREAT|O_TRUNC, 0644)) == -1) {
        rpmError(RPMERR_CREATE, "Could not open %s\n", fileName);
        unlink(sigtarget);