Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FR: Recursive files listing over subdirectories #17

Open
achterbahn opened this issue Feb 7, 2012 · 0 comments
Open

FR: Recursive files listing over subdirectories #17

achterbahn opened this issue Feb 7, 2012 · 0 comments

Comments

@achterbahn
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant