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

(re-open) Fix directory detection for Windows directory symlinks #125

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

Voltra
Copy link

@Voltra Voltra commented Sep 11, 2024

Apps running on Windows that have used php storage:link would see all their exports fail due to /public/storage being treated as a (non-link) file instead of a directory.

Stepping into a debugger revealed that SplFileInfo::isDir(), SplFileInfo::isFile() and SplFileInfo::isLink() all returned false on that specific entry.

However, SplFileInfo::getRealPath() does yield the correct directory path (i.e. the one the symlink points to).

As such, this PR simply makes directory detection portable on all OS that could suffer from this specific issue without hindering the process for other types of files.

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

Successfully merging this pull request may close these issues.

1 participant