summaryrefslogtreecommitdiff
path: root/src/shared
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2014-12-19 01:47:19 +0100
committerLennart Poettering <lennart@poettering.net>2014-12-19 02:07:42 +0100
commite02d225b1eaead537243293a9c02f6baa8aaf55d (patch)
treecd3da7f9f85530ac5086f2d52dd0e94edd88be39 /src/shared
parente1dd6790e4f58506e637bf9541f63504acc2972f (diff)
util: make sure rm_rf() can be called on symlinks (with the effect of deleting it)
Diffstat (limited to 'src/shared')
-rw-r--r--src/shared/util.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/shared/util.c b/src/shared/util.c
index 91cf6705ea..dbae55fe38 100644
--- a/src/shared/util.c
+++ b/src/shared/util.c
@@ -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) {