From 21bdd3005ba586e717b1c812ad1755eee06ff871 Mon Sep 17 00:00:00 2001 From: VicDeo Date: Fri, 1 Jul 2016 12:31:02 +0300 Subject: [PATCH] Fix OC_Helper::rmdirr for nested symlinks (#25255) --- lib/private/helper.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/private/helper.php b/lib/private/helper.php index 7a17352024..cabd1143f8 100644 --- a/lib/private/helper.php +++ b/lib/private/helper.php @@ -221,7 +221,9 @@ class OC_Helper { foreach ($files as $fileInfo) { /** @var SplFileInfo $fileInfo */ - if ($fileInfo->isDir()) { + if ($fileInfo->isLink()) { + unlink($fileInfo->getPathname()); + } else if ($fileInfo->isDir()) { rmdir($fileInfo->getRealPath()); } else { unlink($fileInfo->getRealPath());