diff --git a/typo3/sysext/core/Classes/Resource/ResourceStorage.php b/typo3/sysext/core/Classes/Resource/ResourceStorage.php index def4d7eeb770bca794e26aa6bff7db635db60dc3..ff3c1aaaf60e14679b7c910269027b03ce1eb933 100644 --- a/typo3/sysext/core/Classes/Resource/ResourceStorage.php +++ b/typo3/sysext/core/Classes/Resource/ResourceStorage.php @@ -2844,13 +2844,22 @@ class ResourceStorage implements ResourceStorageInterface } else { if ($this->driver->folderExists($processingFolder) === false) { $rootFolder = $this->getRootLevelFolder(false); - $currentEvaluatePermissions = $this->evaluatePermissions; - $this->evaluatePermissions = false; - $this->processingFolder = $this->createFolder( - $processingFolder, - $rootFolder - ); - $this->evaluatePermissions = $currentEvaluatePermissions; + try { + $currentEvaluatePermissions = $this->evaluatePermissions; + $this->evaluatePermissions = false; + $this->processingFolder = $this->createFolder( + $processingFolder, + $rootFolder + ); + $this->evaluatePermissions = $currentEvaluatePermissions; + } catch (\InvalidArgumentException $e) { + $this->processingFolder = GeneralUtility::makeInstance( + InaccessibleFolder::class, + $this, + $processingFolder, + $processingFolder + ); + } } else { $data = $this->driver->getFolderInfoByIdentifier($processingFolder); $this->processingFolder = $this->getResourceFactoryInstance()->createFolderObject($this, $data['identifier'], $data['name']);