summaryrefslogtreecommitdiff
path: root/src/shared/base-filesystem.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/shared/base-filesystem.c')
-rw-r--r--src/shared/base-filesystem.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/shared/base-filesystem.c b/src/shared/base-filesystem.c
index f68386b8e3..daaeaca515 100644
--- a/src/shared/base-filesystem.c
+++ b/src/shared/base-filesystem.c
@@ -65,6 +65,9 @@ int base_filesystem_create(const char *root) {
const char *target = NULL;
const char *s;
+ if (faccessat(fd, table[i].dir, F_OK, AT_SYMLINK_NOFOLLOW) >= 0)
+ continue;
+
/* check if one of the targets exists */
NULSTR_FOREACH(s, table[i].target) {
if (faccessat(fd, s, F_OK, AT_SYMLINK_NOFOLLOW) < 0)