[BUGFIX] Incorrect check for empty folder
[Packages/TYPO3.CMS.git] / typo3 / sysext / core / Classes / Resource / ResourceStorage.php
index 64865c8..f244b2b 100644 (file)
@@ -1508,7 +1508,7 @@ class ResourceStorage {
                if (!$this->checkFolderActionPermission('remove', $folderObject)) {
                        throw new Exception\InsufficientFileAccessPermissionsException('You are not allowed to access the folder "' . $folderObject->getIdentifier() . '\'', 1323423953);
                }
-               if ($this->driver->isFolderEmpty($folderObject) && !$deleteRecursively) {
+               if (!$this->driver->isFolderEmpty($folderObject) && !$deleteRecursively) {
                        throw new \RuntimeException('Could not delete folder "' . $folderObject->getIdentifier() . '" because it is not empty.', 1325952534);
                }