Skip to content

Commit

Permalink
TemporaryLocalFileStorage::__destruct(): handle symlinks as expected
Browse files Browse the repository at this point in the history
  • Loading branch information
Al2Klimov committed Dec 15, 2017
1 parent b3ab01f commit 4f5b1ed
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion library/Icinga/File/Storage/TemporaryLocalFileStorage.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 4f5b1ed

Please sign in to comment.