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

Error when scanDirectories contains a directory that does not exist. #34

Closed
martinssipenko opened this issue Nov 23, 2020 · 0 comments
Closed

Comments

@martinssipenko
Copy link

martinssipenko commented Nov 23, 2020

In case a configuration file is used with an entry in scanDirectories that points to a directory that does not exist an error is returned.

I believe this happens because relpath returns false after which DIRECTORY_SEPARATOR is appended here:

return realpath(rtrim($path, DIRECTORY_SEPARATOR)) . DIRECTORY_SEPARATOR;

It should append the DIRECTORY_SEPARATOR to the output of rtrim(), not realpath(). Further, there should also be a check or filter to exclude directories that don't exist (cases when realpath() returns false).

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

No branches or pull requests

2 participants