X-Git-Url: https://git.wh0rd.org/?p=dump.git;a=blobdiff_plain;f=restore%2Fsymtab.c;h=4a2e1abe969d5053c91864a16f93a635ede683cf;hp=8cd384c51dd36a7f2ba622f75f0214bdf93fd268;hb=684154694394c35b594ca101b15796898888ebde;hpb=741eb2042c0ebc165d6aeadfd4396882d340adb2 diff --git a/restore/symtab.c b/restore/symtab.c index 8cd384c..4a2e1ab 100644 --- a/restore/symtab.c +++ b/restore/symtab.c @@ -37,7 +37,7 @@ #ifndef lint static const char rcsid[] = - "$Id: symtab.c,v 1.23 2004/12/14 14:07:58 stelian Exp $"; + "$Id: symtab.c,v 1.24 2005/01/14 13:04:07 stelian Exp $"; #endif /* not lint */ /* @@ -189,9 +189,16 @@ lookupname(char *name) char *np, *cp; char buf[MAXPATHLEN]; + ep = lookupino(ROOTINO); + cp = name; + if (*cp == '.') + ++cp; + if (*cp == '/') + ++cp; + if (*cp == '\0') + return ep; - ep = lookupino(ROOTINO); while (ep != NULL) { for (np = buf; *cp != '/' && *cp != '\0' && np < &buf[sizeof(buf)]; ) @@ -202,8 +209,7 @@ lookupname(char *name) oldep = ep; - if (strcmp(ep->e_name, buf) != 0 && - ep->e_entries != NULL) { + if (ep->e_entries != NULL) { ep = ep->e_entries[dir_hash(buf)]; for ( ; ep != NULL; ep = ep->e_sibling)