chiark / gitweb /
tmpfiles: do not fail when copying an empty directory
authorKay Sievers <kay@vrfy.org>
Thu, 19 Jun 2014 16:57:16 +0000 (18:57 +0200)
committerKay Sievers <kay@vrfy.org>
Thu, 19 Jun 2014 16:58:17 +0000 (18:58 +0200)
src/shared/copy.c
src/tmpfiles/tmpfiles.c

index 4c227c8..073b727 100644 (file)
@@ -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;
index 9790122..c6c8ce8 100644 (file)
@@ -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;
                 }