summaryrefslogtreecommitdiff
path: root/common/treepath_vfs.c
diff options
context:
space:
mode:
Diffstat (limited to 'common/treepath_vfs.c')
-rw-r--r--common/treepath_vfs.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/common/treepath_vfs.c b/common/treepath_vfs.c
index 6e6a0a1..9a70f5c 100644
--- a/common/treepath_vfs.c
+++ b/common/treepath_vfs.c
@@ -75,10 +75,8 @@ u_int64_t internal_get_dir_size(struct VfsFilelistData *data, struct PathTree *t
while ((n = filelist_tree_get_item_by_index(tree, idx))) {
if (data->break_get_dir_size) break;
if (n->data) {
-// printf("internal_get_dir_size: found item '%s', size = %lu \n", n->node, n->data->iSize);
- Size += n->data->iSize;
- if ((n->items) && (n->items->len > 0))
- Size += internal_get_dir_size(data, n);
+ log("internal_get_dir_size: found item '%s', size = %llu \n", n->node, n->data->iSize);
+ Size += (n->items && n->items->len > 0) ? internal_get_dir_size(data, n) : n->data->iSize;
}
idx++;
}