about summary refs log tree commit diff
diff options
context:
space:
mode:
authorChristian Neukirchen <chneukirchen@gmail.com>2016-07-19 16:56:09 +0200
committerChristian Neukirchen <chneukirchen@gmail.com>2016-07-19 16:56:09 +0200
commitb43d53558925588662eb2d58787f84240c3592fc (patch)
treefe1df07ed1b2e4c505b00b7702089851bfb91e0c
parent606b7d1cdfb6245f3d6f26af39f83825cde6ec6f (diff)
downloadmblaze-b43d53558925588662eb2d58787f84240c3592fc.tar.gz
mblaze-b43d53558925588662eb2d58787f84240c3592fc.tar.xz
mblaze-b43d53558925588662eb2d58787f84240c3592fc.zip
thread: don't prune on toplevel
-rw-r--r--thread.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/thread.c b/thread.c
index 72680b5..b648c32 100644
--- a/thread.c
+++ b/thread.c
@@ -249,7 +249,7 @@ prune_tree(struct container *c, int depth)
 	do {
 		if (c->child)
 			prune_tree(c->child, depth+1);
-		if (!c->file && c->child && !c->child->next) {
+		if (depth >= 0 && !c->file && c->child && !c->child->next) {
 			// turn into child if we don't exist and only have a child
 			c->mid = c->child->mid;
 			c->file = c->child->file;