fix %doc %docdir contention
authorroot <devnull@localhost>
Wed, 21 Feb 1996 15:28:47 +0000 (15:28 +0000)
committerroot <devnull@localhost>
Wed, 21 Feb 1996 15:28:47 +0000 (15:28 +0000)
CVS patchset: 375
CVS date: 1996/02/21 15:28:47

build/pack.c

index 445fab9..3a67ccd 100644 (file)
@@ -632,16 +632,17 @@ static int process_filelist(Header header, StringBuf sb, int *size,
        
        s = strtok(buf, " \t\n");
        while (s) {
-           if (!strcmp(s, "%doc")) {
+           /* Order of comparison here is important */
+           if (!strcmp(s, "%docdir")) {
+               s = strtok(NULL, " \t\n");
+               addDocdir(s);
+               break;
+           } else if (!strcmp(s, "%doc")) {
                isdoc = 1;
            } else if (!strcmp(s, "%config")) {
                isconf = 1;
            } else if (!strcmp(s, "%dir")) {
                isdir = 1;
-           } else if (!strcmp(s, "%docdir")) {
-               s = strtok(NULL, " \t\n");
-               addDocdir(s);
-               break;
            } else {
                if (isdoc && (*s != '/')) {
                    /* This is a special %doc macro */