fs-util: make symlink_idempotent() optionally create relative link

This commit is contained in:
Yu Watanabe
2018-09-24 18:52:53 +03:00
committed by Lennart Poettering
parent bee13f2e49
commit 6c9c51e5e2
5 changed files with 23 additions and 18 deletions
+2 -2
View File
@@ -1313,7 +1313,7 @@ static int socket_symlink(Socket *s) {
STRV_FOREACH(i, s->symlinks) {
(void) mkdir_parents_label(*i, s->directory_mode);
r = symlink_idempotent(p, *i);
r = symlink_idempotent(p, *i, false);
if (r == -EEXIST && s->remove_on_stop) {
/* If there's already something where we want to create the symlink, and the destructive
@@ -1321,7 +1321,7 @@ static int socket_symlink(Socket *s) {
* again. */
if (unlink(*i) >= 0)
r = symlink_idempotent(p, *i);
r = symlink_idempotent(p, *i, false);
}
if (r < 0)