]> git.wh0rd.org - dump.git/blobdiff - dump/traverse.c
Fix nodump or exclude inodes propagation on directory tree.
[dump.git] / dump / traverse.c
index c8547604a7c0751f14833407938e762acf1ca56f..09bcded2f35e22e261255596253205179e889a4f 100644 (file)
@@ -41,7 +41,7 @@
 
 #ifndef lint
 static const char rcsid[] =
-       "$Id: traverse.c,v 1.44 2002/04/04 08:20:23 stelian Exp $";
+       "$Id: traverse.c,v 1.46 2002/05/16 21:22:36 stelian Exp $";
 #endif /* not lint */
 
 #include <config.h>
@@ -668,12 +668,13 @@ searchdir(struct ext2_dir_entry *dp, int offset, int blocksize, char *buf, void
                ip = getino(dp->inode);
                if (TSTINO(dp->inode, dumpinomap)) {
                        CLRINO(dp->inode, dumpinomap);
-                       CLRINO(dp->inode, usedinomap);
                        *tapesize -= blockest(ip);
                }
-               /* Add dir back to the dir map, to propagate nodump */
+               /* Add dir back to the dir map and remove from
+                * usedinomap to propagate nodump */
                if ((ip->di_mode & IFMT) == IFDIR) {
                        SETINO(dp->inode, dumpdirmap);
+                       CLRINO(dp->inode, usedinomap);
                        *ret |= HASSUBDIRS;
                }
        } else {
@@ -827,7 +828,6 @@ dumpino(struct dinode *dp, dump_ino_t ino, int metaonly)
        spcl.c_count = 0;
 
        if (metaonly && (dp->di_mode & S_IFMT)) {
-               printf("Write header with spcl.c_count=%d\n",spcl.c_count);
                spcl.c_flags |= DR_METAONLY;
                spcl.c_count = 0;
                writeheader(ino);