[BUGFIX] LocalDriver: Recursive file listing is broken 81/17881/11
authorAndreas Wolf <andreas.wolf@typo3.org>
Tue, 29 Jan 2013 14:11:24 +0000 (15:11 +0100)
committerSteffen Ritter <info@rs-websystems.de>
Thu, 4 Jul 2013 19:18:14 +0000 (21:18 +0200)
commit515eeaefad54d1cab731338306ff64e167a2d7e4
tree08017256cef26d10c4a55030c54a035cd6adcbe8
parenteab7aa7f2d82cb2e2f19d19f247d31e6494c22bd
[BUGFIX] LocalDriver: Recursive file listing is broken

The recursive file listing, introduced as part of the public API in
the fix for #43249, is currently broken.

One problem is that the file information retrieval is incomplete: The
filename of files in subfolders also contains the path to this file from
the current folder, while the identifier is missing that information.
The identifier is thus wrong and the filename contains too much
information (more than the filename).

Additionally, the method getDirectoryItemList() returns the file list
with the filenames as key, which will fail when a file name exists twice
in different folders. Therefore, this patch changes the keys to numeric
values when a recursive folder list is requested.

Change-Id: Iaebd862327d2dfc849044236474f6da2444cd4f5
Resolves: #44910
Releases: 6.1, 6.0
Reviewed-on: https://review.typo3.org/17881
Reviewed-by: Steffen Ritter
Tested-by: Steffen Ritter
typo3/sysext/core/Classes/Resource/Driver/AbstractDriver.php
typo3/sysext/core/Classes/Resource/Driver/LocalDriver.php
typo3/sysext/core/Classes/Resource/Folder.php
typo3/sysext/core/Classes/Resource/ResourceStorage.php
typo3/sysext/core/Classes/Utility/ResourceUtility.php [new file with mode: 0644]
typo3/sysext/core/Tests/Unit/Resource/Driver/LocalDriverTest.php
typo3/sysext/core/Tests/Unit/Utility/ResourceUtilityTest.php [new file with mode: 0644]