]> git.wh0rd.org - dump.git/blobdiff - restore/restore.c
LFS compatibility.
[dump.git] / restore / restore.c
index d438f41dd0813e02f407fbd520586a286cfad318..7197a3dd5f311885dfaf4dbf99ee53d55c17377f 100644 (file)
@@ -2,7 +2,8 @@
  *     Ported to Linux's Second Extended File System as part of the
  *     dump and restore backup suit
  *     Remy Card <card@Linux.EU.Org>, 1994-1997
- *     Stelian Pop <pop@cybercable.fr>, 1999-2000
+ *     Stelian Pop <pop@noos.fr>, 1999-2000
+ *     Stelian Pop <pop@noos.fr> - AlcĂ´ve <www.alcove.fr>, 2000
  */
 
 /*
 
 #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.13 2000/12/21 11:14:54 stelian Exp $";
 #endif /* not lint */
 
+#include <config.h>
 #include <sys/types.h>
 
 #ifdef __linux__
@@ -89,7 +91,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 +116,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)