From 23e208e742855d28bb3b02db2093e5a8ffc102f6 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Fri, 3 Mar 2023 11:27:42 +0100 Subject: tmpfile-util: teach link_tmpfile() to optionally replace files --- src/portable/portable.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/portable') diff --git a/src/portable/portable.c b/src/portable/portable.c index 7811833fac..377e1a9937 100644 --- a/src/portable/portable.c +++ b/src/portable/portable.c @@ -1188,7 +1188,7 @@ static int attach_unit_file( if (fchmod(fd, 0644) < 0) return log_debug_errno(errno, "Failed to change unit file access mode for '%s': %m", path); - r = link_tmpfile(fd, tmp, path); + r = link_tmpfile(fd, tmp, path, /* replace= */ false); if (r < 0) return log_debug_errno(r, "Failed to install unit file '%s': %m", path); -- cgit v1.2.1