mirror of
https://github.com/systemd/systemd-stable.git
synced 2025-01-08 21:17:47 +03:00
tmpfiles: do not fail when copying an empty directory
This commit is contained in:
parent
eca8701ae7
commit
19f3934057
@ -203,6 +203,7 @@ static int fd_copy_directory(int df, const char *from, const struct stat *st, in
|
|||||||
r = -errno;
|
r = -errno;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
r = 0;
|
||||||
FOREACH_DIRENT(de, d, return -errno) {
|
FOREACH_DIRENT(de, d, return -errno) {
|
||||||
struct stat buf;
|
struct stat buf;
|
||||||
int q;
|
int q;
|
||||||
|
@ -669,7 +669,7 @@ static int create_item(Item *i) {
|
|||||||
case COPY_FILES:
|
case COPY_FILES:
|
||||||
r = copy_tree(i->argument, i->path);
|
r = copy_tree(i->argument, i->path);
|
||||||
if (r < 0) {
|
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;
|
return r;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user