Skip to content

FR: Recursive files listing over subdirectories #17

@achterbahn

Description

@achterbahn

When changing the lines

/** @var DirectoryIterator $file */
foreach (new DirectoryIterator($curPath) as $file) {

with

/** @var DirectoryIterator $file */
$di = new RecursiveDirectoryIterator($path);
foreach (new RecursiveIteratorIterator($di) as $filename => $file) {

FileLister iterates recursivly into the subdirectories of a given path.

Changed
$filePath = $relPath.(!empty($relPath) ? '/' :
with
$filePath = str_replace($path, '', $filePath);

and the download links working.

I'm not a developer and I think this is a hack without knowing if I produced a security risk or other issues with that change...

Would be great if this functionality is integrated into FileLister.

Thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions