From: Thomas Hindoe Paaboel Andersen <pho...@gmail.com> after 19f3934057d20c63f4c95791312038a41b4666d0 the errors from chown/chmod will be cleared before being read. Presumably to clear the possible EEXIST from copying to an existing directory. Note: with this patch we stop immediately on error in chown/chmod while before we would attempt to copy anyway. --- src/shared/copy.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/shared/copy.c b/src/shared/copy.c index 867e49b..5434e7b 100644 --- a/src/shared/copy.c +++ b/src/shared/copy.c @@ -181,10 +181,10 @@ static int fd_copy_directory(int df, const char *from, const struct stat *st, in if (created) { if (fchown(fdt, st->st_uid, st->st_gid) < 0) - r = -errno; + return -errno; if (fchmod(fdt, st->st_mode & 07777) < 0) - r = -errno; + return -errno; } r = 0; -- 1.9.3 _______________________________________________ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel