diff --git a/src/basic/fs-util.c b/src/basic/fs-util.c index b90f343ed3..946f779a32 100644 --- a/src/basic/fs-util.c +++ b/src/basic/fs-util.c @@ -766,12 +766,11 @@ int chase_symlinks(const char *path, const char *original_root, unsigned flags, return -ENOMEM; } - } - - /* Prefix what's left to do with what we just read, and start the loop again, - * but remain in the current directory. */ - - joined = strjoin("/", destination, todo); + /* Prefix what's left to do with what we just read, and start the loop again, but + * remain in the current directory. */ + joined = strjoin(destination, todo); + } else + joined = strjoin("/", destination, todo); if (!joined) return -ENOMEM;