From 65290fbf3f88ced422d219679fdcd4dc7ec9699b Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Wed, 3 Apr 2019 16:53:14 +0200 Subject: [PATCH] shared: path_join() is your friend --- src/shared/base-filesystem.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/shared/base-filesystem.c b/src/shared/base-filesystem.c index a55b2a017ff..33c13af6c4e 100644 --- a/src/shared/base-filesystem.c +++ b/src/shared/base-filesystem.c @@ -14,6 +14,7 @@ #include "log.h" #include "macro.h" #include "nulstr-util.h" +#include "path-util.h" #include "string-util.h" #include "umask-util.h" #include "user-util.h" @@ -68,7 +69,7 @@ int base_filesystem_create(const char *root, uid_t uid, gid_t gid) { if (table[i].exists) { _cleanup_free_ char *p = NULL; - p = strjoin(s, "/", table[i].exists); + p = path_join(s, table[i].exists); if (!p) return log_oom();