Actually set the again flag when calling the dirtree comeagain callback.
authorRob Landley <rob@landley.net>
Wed, 30 Jul 2014 01:02:31 +0000 (20:02 -0500)
committerRob Landley <rob@landley.net>
Wed, 30 Jul 2014 01:02:31 +0000 (20:02 -0500)
lib/dirtree.c

index 8445ca4..df95e91 100644 (file)
@@ -163,7 +163,10 @@ int dirtree_recurse(struct dirtree *node,
     }
   }
 
-  if (flags & DIRTREE_COMEAGAIN) flags = callback(node);
+  if (flags & DIRTREE_COMEAGAIN) {
+    node->again++;
+    flags = callback(node);
+  }
 
   // This closes filehandle as well, so note it
   closedir(dir);