0012688: Tinebase_FileSystem - fix clear deleted files
authorPaul Mehrer <p.mehrer@metaways.de>
Thu, 16 Feb 2017 11:29:43 +0000 (12:29 +0100)
committerPhilipp Schüle <p.schuele@metaways.de>
Wed, 22 Feb 2017 10:52:20 +0000 (11:52 +0100)
be more safe and check if directory contents
are directories as expected. Only relevant
if license generator is present currently

https://forge.tine20.org/view.php?id=12688

Change-Id: I7f36f115df5b0c892f654df55c1b76e6cb1afe90
Reviewed-on: http://gerrit.tine20.com/customers/4223
Reviewed-by: Philipp Schüle <p.schuele@metaways.de>
Tested-by: Philipp Schüle <p.schuele@metaways.de>
tine20/Tinebase/FileSystem.php

index 0bcaedc..d6f5143 100644 (file)
@@ -1172,6 +1172,9 @@ class Tinebase_FileSystem implements Tinebase_Controller_Interface
         
         $deleteCount = 0;
         foreach ($dirIterator as $item) {
+            if (!$item->isDir()) {
+                continue;
+            }
             $subDir = $item->getFileName();
             if ($subDir[0] == '.') continue;
             if (Tinebase_Core::isLogLevel(Zend_Log::TRACE)) Tinebase_Core::getLogger()->trace(__METHOD__ . '::' . __LINE__