[BUGFIX] Catch exceptions for inaccessible storages
[Packages/TYPO3.CMS.git] / typo3 / sysext / core / Classes / Resource / Driver / LocalDriver.php
index 2279af0..d68553c 100644 (file)
@@ -1077,13 +1077,16 @@ class LocalDriver extends AbstractHierarchicalFilesystemDriver {
         *
         * @param string $identifier
         * @return array
-        * @throws \RuntimeException
+        * @throws \TYPO3\CMS\Core\Resource\Exception\ResourcePermissionsUnavailableException
         */
        public function getPermissions($identifier) {
                $path = $this->getAbsolutePath($identifier);
                $permissionBits = fileperms($path);
                if ($permissionBits === FALSE) {
-                       throw new \RuntimeException('Error while fetching permissions for ' . $path, 1319455097);
+                       throw new \TYPO3\CMS\Core\Resource\Exception\ResourcePermissionsUnavailableException(
+                               'Error while fetching permissions for ' . $path,
+                               1319455097
+                       );
                }
                return array(
                        'r' => (bool)is_readable($path),