X-Git-Url: https://git.wh0rd.org/?p=dump.git;a=blobdiff_plain;f=restore%2Frestore.c;h=fe6c2ccd3454b0377dd2a994d5c26d3389c840db;hp=d438f41dd0813e02f407fbd520586a286cfad318;hb=9be511dc8a07570d6c95075573272fce6e9113d4;hpb=79e318657e7faa7b2951ff554dc6f1b92624a477 diff --git a/restore/restore.c b/restore/restore.c index d438f41..fe6c2cc 100644 --- a/restore/restore.c +++ b/restore/restore.c @@ -40,7 +40,7 @@ #ifndef lint static const char rcsid[] = - "$Id: restore.c,v 1.9 2000/06/01 18:30:08 stelian Exp $"; + "$Id: restore.c,v 1.10 2000/08/20 15:17:36 stelian Exp $"; #endif /* not lint */ #include @@ -89,7 +89,7 @@ listfile(char *name, ino_t ino, int type) long addfile(char *name, ino_t ino, int type) { - register struct entry *ep; + register struct entry *ep, *np; long descend = hflag ? GOOD : FAIL; char buf[100]; @@ -114,6 +114,11 @@ addfile(char *name, ino_t ino, int type) return (descend); } type |= LINK; + for (np = ep->e_links; np; np = np->e_links) + if (strcmp(name, myname(np)) == 0) { + np->e_flags |= NEW; + return (descend); + } } ep = addentry(name, ino, type); if (type == NODE)