[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
Showing
- typo3/sysext/core/Classes/Resource/Driver/AbstractDriver.php 2 additions, 2 deletionstypo3/sysext/core/Classes/Resource/Driver/AbstractDriver.php
- typo3/sysext/core/Classes/Resource/Driver/LocalDriver.php 48 additions, 16 deletionstypo3/sysext/core/Classes/Resource/Driver/LocalDriver.php
- typo3/sysext/core/Classes/Resource/Folder.php 8 additions, 1 deletiontypo3/sysext/core/Classes/Resource/Folder.php
- typo3/sysext/core/Classes/Resource/ResourceStorage.php 6 additions, 1 deletiontypo3/sysext/core/Classes/Resource/ResourceStorage.php
- typo3/sysext/core/Classes/Utility/ResourceUtility.php 75 additions, 0 deletionstypo3/sysext/core/Classes/Utility/ResourceUtility.php
- typo3/sysext/core/Tests/Unit/Resource/Driver/LocalDriverTest.php 31 additions, 4 deletions...ysext/core/Tests/Unit/Resource/Driver/LocalDriverTest.php
- typo3/sysext/core/Tests/Unit/Utility/ResourceUtilityTest.php 85 additions, 0 deletionstypo3/sysext/core/Tests/Unit/Utility/ResourceUtilityTest.php
Please register or sign in to comment