mirror of
https://github.com/systemd/systemd.git
synced 2025-09-08 13:44:41 +03:00
tmpfiles: 'e' is supposed to operate on directory only
This commit is contained in:
@@ -859,6 +859,9 @@ static int path_set_perms(Item *i, const char *path) {
|
||||
if (fstat(fd, &st) < 0)
|
||||
return log_error_errno(errno, "Failed to fstat() file %s: %m", path);
|
||||
|
||||
if (i->type == EMPTY_DIRECTORY && !S_ISDIR(st.st_mode))
|
||||
return log_error_errno(EEXIST, "'%s' already exists and is not a directory. ", path);
|
||||
|
||||
return fd_set_perms(i, fd, &st);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user