summaryrefslogtreecommitdiff
path: root/build
diff options
context:
space:
mode:
authormarc <devnull@localhost>1996-07-23 14:11:02 +0000
committermarc <devnull@localhost>1996-07-23 14:11:02 +0000
commit12c4bc76c697af65902c4e7b2758e60497398545 (patch)
tree457826ce5fd1d63b4477da827b7143ab70fed567 /build
parentbeb6d2d6cc708995cfa6c4b7d40f1084373a9371 (diff)
downloadrpm-12c4bc76c697af65902c4e7b2758e60497398545.tar.gz
rpm-12c4bc76c697af65902c4e7b2758e60497398545.tar.bz2
rpm-12c4bc76c697af65902c4e7b2758e60497398545.zip
catch duplicate files
CVS patchset: 922 CVS date: 1996/07/23 14:11:02
Diffstat (limited to 'build')
-rw-r--r--build/files.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/build/files.c b/build/files.c
index 29d8fefb8..18096c7df 100644
--- a/build/files.c
+++ b/build/files.c
@@ -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;