[systemd-commits] src/shared src/tmpfiles
Kay Sievers
kay at kemper.freedesktop.org
Thu Jun 19 10:11:38 PDT 2014
src/shared/copy.c | 1 +
src/tmpfiles/tmpfiles.c | 2 +-
2 files changed, 2 insertions(+), 1 deletion(-)
New commits:
commit 19f3934057d20c63f4c95791312038a41b4666d0
Author: Kay Sievers <kay at vrfy.org>
Date: Thu Jun 19 18:57:16 2014 +0200
tmpfiles: do not fail when copying an empty directory
diff --git a/src/shared/copy.c b/src/shared/copy.c
index 4c227c8..073b727 100644
--- a/src/shared/copy.c
+++ b/src/shared/copy.c
@@ -203,6 +203,7 @@ static int fd_copy_directory(int df, const char *from, const struct stat *st, in
r = -errno;
}
+ r = 0;
FOREACH_DIRENT(de, d, return -errno) {
struct stat buf;
int q;
diff --git a/src/tmpfiles/tmpfiles.c b/src/tmpfiles/tmpfiles.c
index 9790122..c6c8ce8 100644
--- a/src/tmpfiles/tmpfiles.c
+++ b/src/tmpfiles/tmpfiles.c
@@ -669,7 +669,7 @@ static int create_item(Item *i) {
case COPY_FILES:
r = copy_tree(i->argument, i->path);
if (r < 0) {
- log_error("Failed to copy files: %s", strerror(-r));
+ log_error("Failed to copy files to %s: %s", i->path, strerror(-r));
return r;
}
More information about the systemd-commits
mailing list