summaryrefslogtreecommitdiff
path: root/lib/fstree/fstree_from_dir.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/fstree/fstree_from_dir.c')
-rw-r--r--lib/fstree/fstree_from_dir.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/fstree/fstree_from_dir.c b/lib/fstree/fstree_from_dir.c
index e0ea600..a11f383 100644
--- a/lib/fstree/fstree_from_dir.c
+++ b/lib/fstree/fstree_from_dir.c
@@ -5,7 +5,7 @@
* Copyright (C) 2019 David Oberhollenzer <goliath@infraroot.at>
*/
#include "config.h"
-#include "fstree.h"
+#include "internal.h"
#include <dirent.h>
#include <stdlib.h>
@@ -98,9 +98,7 @@ static int add_node(fstree_t *fs, tree_node_t *root,
n->mod_time = fs->defaults.st_mtime;
}
- n->parent = root;
- n->next = root->data.dir.children;
- root->data.dir.children = n;
+ fstree_insert_sorted(root, n);
return 0;
}