Both "foo/" and "foo" should match "foo/bar", so strip
trailing '/' characters on include patterns for extraction. Pointed out by: games/quakeforge port (thanks to Kris!)
This commit is contained in:
parent
3bbd46d6d9
commit
9c86db05ef
@ -102,6 +102,9 @@ add_pattern(struct bsdtar *bsdtar, struct match **list, const char *pattern)
|
||||
if (pattern[0] == '/')
|
||||
pattern++;
|
||||
strcpy(match->pattern, pattern);
|
||||
/* Both "foo/" and "foo" should match "foo/bar". */
|
||||
if (match->pattern[strlen(match->pattern)-1] == '/')
|
||||
match->pattern[strlen(match->pattern)-1] = '\0';
|
||||
match->next = *list;
|
||||
*list = match;
|
||||
match->matches = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user