1
0
mirror of https://github.com/systemd/systemd.git synced 2024-12-26 03:22:00 +03:00

util: make sure rm_rf() can be called on symlinks (with the effect of deleting it)

This commit is contained in:
Lennart Poettering 2014-12-19 01:47:19 +01:00
parent e1dd6790e4
commit e02d225b1e

View File

@ -3069,7 +3069,7 @@ static int rm_rf_internal(const char *path, bool only_dirs, bool delete_root, bo
fd = open(path, O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC|O_NOFOLLOW|O_NOATIME);
if (fd < 0) {
if (errno != ENOTDIR)
if (errno != ENOTDIR && errno != ELOOP)
return -errno;
if (!dangerous) {