[BUGFIX] Uncaught Exception when accessing "Filelist" module in Windows
authorNicole Cordes <n.cordes@biz-design.biz>
Tue, 11 Sep 2012 10:36:40 +0000 (12:36 +0200)
committerOliver Hader <oliver.hader@typo3.org>
Tue, 18 Sep 2012 19:46:05 +0000 (21:46 +0200)
An Exception is thrown when files are found directly in fileadmin folder.
Because of a backslash a false identifier is generated and file cannot be
found anymore.

Change-Id: I6c9e8b56654dfb44ec33f697219b5299883e82c5
Fixes: #39130
Releases: 6.0
Reviewed-on: http://review.typo3.org/14514
Reviewed-by: Oliver Hader
Reviewed-by: Wouter Wolters
Reviewed-by: Simon Schaufelberger
Tested-by: Simon Schaufelberger
Tested-by: Oliver Hader
typo3/sysext/core/Classes/Resource/Driver/LocalDriver.php

index 7bd6c55..b4626a6 100644 (file)
@@ -207,7 +207,9 @@ class LocalDriver extends \TYPO3\CMS\Core\Resource\Driver\AbstractDriver {
        public function getFileInfoByIdentifier($fileIdentifier) {
                // Makes sure the Path given as parameter is valid
                $this->checkFilePath($fileIdentifier);
-               $dirPath = dirname($fileIdentifier);
+               $dirPath = \TYPO3\CMS\Core\Utility\GeneralUtility::fixWindowsFilePath(
+                       dirname($fileIdentifier)
+               );
                if ($dirPath !== '' && $dirPath !== '/') {
                        $dirPath = '/' . trim($dirPath, '/') . '/';
                }