]> git.wh0rd.org - dump.git/blobdiff - restore/restore.c
Fixed a problem when reading tapes written with ancient dump versions on big endian...
[dump.git] / restore / restore.c
index 2a398fc18816e9c7e5ada0ca2fb4c11c856d139b..854c3fcd392a9880807c8173bb8e12e4c954c13f 100644 (file)
@@ -41,7 +41,7 @@
 
 #ifndef lint
 static const char rcsid[] =
-       "$Id: restore.c,v 1.27 2002/02/04 11:18:46 stelian Exp $";
+       "$Id: restore.c,v 1.29 2002/04/04 08:20:23 stelian Exp $";
 #endif /* not lint */
 
 #include <config.h>
@@ -746,6 +746,7 @@ createleaves(char *symtabfile)
        struct entry *ep;
        dump_ino_t first;
        long curvol;
+       int doremove;
 
        if (command == 'R') {
                Vprintf(stdout, "Continue extraction of new leaves\n");
@@ -796,11 +797,11 @@ createleaves(char *symtabfile)
                 * be removed since its type may change from one leaf type
                 * to another (e.g. "file" to "character special").
                 */
-               if ((ep->e_flags & EXTRACT) != 0) {
-                       removeleaf(ep);
-                       ep->e_flags &= ~REMOVED;
-               }
-               (void) extractfile(myname(ep));
+               if ((ep->e_flags & EXTRACT) != 0)
+                       doremove = 1;
+               else
+                       doremove = 0;
+               (void) extractfile(ep, doremove);
                ep->e_flags &= ~(NEW|EXTRACT);
                /*
                 * We checkpoint the restore after every tape reel, so
@@ -931,15 +932,10 @@ createfiles(void)
                                                        if (GetTapePos(&curtpos) == 0)
                                                                msg("before resync at tape position %lld (%ld, %ld, %s)\n", curtpos, next, curfile.ino, curfile.name);
 #endif
-msg("bobo1\n");
                                                        ReReadInodeFromTape(next);
 #ifdef DEBUG_QFA
-msg("bobo2\n");
-                                                       if (GetTapePos(&curtpos) == 0) {
-msg("bobo3\n");
+                                                       if (GetTapePos(&curtpos) == 0)
                                                                msg("after resync at tape position %lld (%ld, %ld, %s)\n", curtpos, next, curfile.ino, curfile.name);
-msg("bobo4\n");
-                                                       }
 #endif
                                                }
                                        }
@@ -1034,7 +1030,7 @@ msg("bobo4\n");
                        else {
                                msg("restoring %s\n", myname(ep));
 #endif /* USE_QFA */
-                               (void) extractfile(myname(ep));
+                               (void) extractfile(ep, 0);
 #ifdef USE_QFA
                        }
 #endif /* USE_QFA */