-
Notifications
You must be signed in to change notification settings - Fork 27
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
Use SplFileInfo #5
Conversation
deprecate DrupalFinder::shiftPathUp, does not Work with streamWrapper on Windows
Use SplFileInfo to simplify DrupalFinder::locateRoot
Looks great! Thanks. When i went to SplFileInfo i was searching for an Iterator to walk up the FileSystem. Something like this:
Didn't find anything like that. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The first call to $path->getRealPath()
clears all symlinks. see SplFileInfo::getRealPath
So for $follow_symlinks = TRUE
we will not finde any more symlinks. No need to check for a link in the loop.
What are the use cases for not following symlinks?
- shared modules
any more?
We should add explicit tests for this use cases.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The test are good, my idea of the simplification was wrong...
} | ||
} | ||
while (($path = $path->getPathInfo()) && ($path->getFilename() != '.')); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This works only with a streamwrapper... not a real FS... it get's into a loop at fs-root.
No description provided.