aboutsummaryrefslogtreecommitdiff
path: root/lib/fstree
diff options
context:
space:
mode:
Diffstat (limited to 'lib/fstree')
-rw-r--r--lib/fstree/gen_file_list.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/fstree/gen_file_list.c b/lib/fstree/gen_file_list.c
index c1cde51..6b10b00 100644
--- a/lib/fstree/gen_file_list.c
+++ b/lib/fstree/gen_file_list.c
@@ -9,8 +9,10 @@
static file_info_t *file_list_dfs(tree_node_t *n)
{
- if (S_ISREG(n->mode))
+ if (S_ISREG(n->mode)) {
+ n->data.file->next = NULL;
return n->data.file;
+ }
if (S_ISDIR(n->mode)) {
file_info_t *list = NULL, *last = NULL;