catch duplicate files
authormarc <devnull@localhost>
Tue, 23 Jul 1996 14:11:02 +0000 (14:11 +0000)
committermarc <devnull@localhost>
Tue, 23 Jul 1996 14:11:02 +0000 (14:11 +0000)
CVS patchset: 922
CVS date: 1996/07/23 14:11:02

build/files.c

index 29d8fef..18096c7 100644 (file)
@@ -296,6 +296,11 @@ int process_filelist(Header header, struct PackageRec *pr,
            } else {
                fileList[c] = strrchr(fest->file, '/') + 1;
            }
+           if ((c > 0) && !strcmp(fileList[c], fileList[c-1])) {
+               error(RPMERR_BADSPEC, "File listed twice: %s", fileList[c]);
+               return(RPMERR_BADSPEC);
+           }
+           
            fileUnameList[c] = fest->uname;
            fileGnameList[c] = fest->gname;
            *size += fest->statbuf.st_size;