[BUGFIX] Hidden files/folders are always filtered
authorAndreas Wolf <andreas.wolf@typo3.org>
Sat, 20 Oct 2012 17:07:41 +0000 (19:07 +0200)
committerSteffen Ritter <info@rs-websystems.de>
Thu, 1 Nov 2012 13:20:45 +0000 (14:20 +0100)
The local driver has a hardcoded filter for dot-files, i.e. files whose
name starts with a dot. However, we (or the user) might need these files
in some situations. Therefore, the filter should be added by default,
but should be removable, which is the case if we use the extensible
filter mechanisms provided by FAL. This is done with this commit.

Resolves: #42230
Releases: 6.0
Change-Id: I69ff38d35f75e2a7f4bbb7574caf6a261638512d
Reviewed-on: http://review.typo3.org/15859
Reviewed-by: Dominik Mathern
Tested-by: Dominik Mathern
Reviewed-by: Steffen Ritter
Tested-by: Steffen Ritter
typo3/sysext/core/Classes/Resource/Driver/LocalDriver.php

index 52a00d7..8618e55 100644 (file)
@@ -376,7 +376,7 @@ class LocalDriver extends \TYPO3\CMS\Core\Resource\Driver\AbstractDriver {
                        return array('', array());
                }
                // also don't show hidden files
-               if ($folderName === '..' || $folderName === '.' || $folderName === '' || \TYPO3\CMS\Core\Utility\GeneralUtility::isFirstPartOfStr($folderName, '.') === TRUE) {
+               if ($folderName === '..' || $folderName === '.' || $folderName === '') {
                        return array('', array());
                }
                // remove the trailing slash from the folder name (the trailing slash comes from the DirectoryIterator)