aboutsummaryrefslogtreecommitdiff
path: root/lib/fstree/src/add_by_path.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/fstree/src/add_by_path.c')
-rw-r--r--lib/fstree/src/add_by_path.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/fstree/src/add_by_path.c b/lib/fstree/src/add_by_path.c
index 0afd898..344b586 100644
--- a/lib/fstree/src/add_by_path.c
+++ b/lib/fstree/src/add_by_path.c
@@ -31,13 +31,13 @@ tree_node_t *fstree_add_generic(fstree_t *fs, const char *path,
name = strrchr(path, '/');
name = (name == NULL ? path : (name + 1));
- child = parent->data.dir.children;
+ child = parent->data.children;
while (child != NULL && strcmp(child->name, name) != 0)
child = child->next;
out:
if (child != NULL) {
if (!S_ISDIR(child->mode) || !S_ISDIR(sb->st_mode) ||
- !child->data.dir.created_implicitly) {
+ !(child->flags & FLAG_DIR_CREATED_IMPLICITLY)) {
errno = EEXIST;
return NULL;
}
@@ -46,7 +46,7 @@ out:
child->gid = sb->st_gid;
child->mode = sb->st_mode;
child->mod_time = sb->st_mtime;
- child->data.dir.created_implicitly = false;
+ child->flags &= ~FLAG_DIR_CREATED_IMPLICITLY;
return child;
}