summaryrefslogtreecommitdiffstats
path: root/libbb
diff options
context:
space:
mode:
authorgraham.gower <graham.gower@e8e0d7a0-c8d9-11dd-a880-a1081c7ac358>2010-08-24 00:09:34 (EDT)
committer graham.gower <graham.gower@e8e0d7a0-c8d9-11dd-a880-a1081c7ac358>2010-08-24 00:09:34 (EDT)
commitf637389e79f9fb04b73d4fe254fea63e9b077a94 (patch)
tree3d9e0a82376687b2d785778692ca4b960e810ae8 /libbb
parent0066c1ac6151d99b95453eeab3307e99f5884a45 (diff)
Accept a leading "./" for the control file name, but don't mandate it.
git-svn-id: http://opkg.googlecode.com/svn/trunk@558 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
Diffstat (limited to 'libbb')
-rw-r--r--libbb/unarchive.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/libbb/unarchive.c b/libbb/unarchive.c
index 0e820c8..44f8715 100644
--- a/libbb/unarchive.c
+++ b/libbb/unarchive.c
@@ -295,8 +295,13 @@ unarchive(FILE *src_stream, FILE *out_stream,
if (extract_names != NULL) {
int found_flag = FALSE;
+ char *p = file_entry->name;
+
+ if (p[0] == '.' && p[1] == '/')
+ p += 2;
+
for(i = 0; extract_names[i] != 0; i++) {
- if (strcmp(extract_names[i], file_entry->name) == 0) {
+ if (strcmp(extract_names[i], p) == 0) {
found_flag = TRUE;
break;
}