MaxServ / t3ext-fal_s3

S3 driver for FAL
GNU General Public License v2.0
13 stars 10 forks source link

AmazonS3Driver::resolveFolderEntries does not retrieve list of files with recursive flag. #21

Closed timohund closed 6 years ago

timohund commented 6 years ago

When i excute the method AmazonS3Driver::resolveFolderEntries with the flag $recursive = true and $includeDirectories = false, i do not get a list of all files in the subfolder.

I guess there is problem with getChildren and hasChildren because $this->filesAndFolders only contains files and therefore the \RecursiveIteratorIterator in AmazonS3Driver does not get the subfolders.

The method CachedDirectoryIterator::getFileOrFoldersFromCacheEntry does not fill the property CachedDirectoryIterator::filesAndFolders with the subdirectories, because it is called with $includeDirectories = false

I would expect to get a list of all files (and only files) also from the subdirectories.

timohund commented 6 years ago

I think in general the filtering for folders is fine an needed because this flag needs to be evaluated, but in case of recursive traversal it prevents from iterating over the subfolders, so maybe the exclusion could be done in a second step.