From 4f5b1ed5fc1abc9f665ffe5e711441bb167ce42f Mon Sep 17 00:00:00 2001 From: "Alexander A. Klimov" Date: Thu, 14 Dec 2017 16:55:56 +0100 Subject: [PATCH] TemporaryLocalFileStorage::__destruct(): handle symlinks as expected --- library/Icinga/File/Storage/TemporaryLocalFileStorage.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/Icinga/File/Storage/TemporaryLocalFileStorage.php b/library/Icinga/File/Storage/TemporaryLocalFileStorage.php index 05d633588e..6fd751c783 100644 --- a/library/Icinga/File/Storage/TemporaryLocalFileStorage.php +++ b/library/Icinga/File/Storage/TemporaryLocalFileStorage.php @@ -41,7 +41,7 @@ public function __destruct() foreach ($directoryIterator as $path => $entry) { /** @var \SplFileInfo $entry */ - if ($entry->isDir()) { + if ($entry->isDir() && ! $entry->isLink()) { rmdir($path); } else { unlink($path);