Mercurial > hg > dmlib
comparison tools/packed.c @ 1267:ad13510c8e41
Fix handling of -x option in packed.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Wed, 27 May 2015 01:15:59 +0300 |
parents | e8c99da451cd |
children | cb9865a49134 |
comparison
equal
deleted
inserted
replaced
1266:c43c8e5118a0 | 1267:ad13510c8e41 |
---|---|
73 } | 73 } |
74 | 74 |
75 | 75 |
76 BOOL argHandleOpt(const int optN, char *optArg, char *currArg) | 76 BOOL argHandleOpt(const int optN, char *optArg, char *currArg) |
77 { | 77 { |
78 (void) optArg; | 78 (void) currArg; |
79 switch (optN) | 79 switch (optN) |
80 { | 80 { |
81 case 0: | 81 case 0: |
82 argShowHelp(); | 82 argShowHelp(); |
83 exit(0); | 83 exit(0); |
120 break; | 120 break; |
121 | 121 |
122 case 9: | 122 case 9: |
123 if (nexcFilenames < SET_MAX_FILES) | 123 if (nexcFilenames < SET_MAX_FILES) |
124 { | 124 { |
125 excFilenames[nexcFilenames++] = currArg; | 125 excFilenames[nexcFilenames++] = optArg; |
126 } | 126 } |
127 else | 127 else |
128 { | 128 { |
129 dmErrorMsg("Maximum number of exclusion patterns (%d) exceeded!\n", | 129 dmErrorMsg("Maximum number of exclusion patterns (%d) exceeded!\n", |
130 SET_MAX_FILES); | 130 SET_MAX_FILES); |
768 if (nsrcFilenames > 0) | 768 if (nsrcFilenames > 0) |
769 { | 769 { |
770 match = FALSE; | 770 match = FALSE; |
771 for (i = 0; (i < nsrcFilenames) && !match; i++) | 771 for (i = 0; (i < nsrcFilenames) && !match; i++) |
772 { | 772 { |
773 match = dm_strmatch(node->filename, srcFilenames[i]); | 773 if (dm_strmatch(node->filename, srcFilenames[i]) && |
774 !dmCheckExcluded(node->filename)) | |
775 match = TRUE; | |
774 } | 776 } |
775 } | 777 } |
776 else | 778 else |
777 match = TRUE; | 779 { |
780 match = !dmCheckExcluded(node->filename); | |
781 } | |
778 | 782 |
779 if (match && (node->privFlags & PACK_EXTRACTED) == 0) | 783 if (match && (node->privFlags & PACK_EXTRACTED) == 0) |
780 { | 784 { |
781 // Mark as done | 785 // Mark as done |
782 node->privFlags |= PACK_EXTRACTED; | 786 node->privFlags |= PACK_EXTRACTED; |