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

Recursive directory iterator tries to follow symlink on macOS #122

Closed
wolfv opened this issue May 18, 2021 · 3 comments
Closed

Recursive directory iterator tries to follow symlink on macOS #122

wolfv opened this issue May 18, 2021 · 3 comments
Assignees
Labels
available on master Fix is done on master branch, issue closed on next release bug Something isn't working POSIX POSIX type backend is affected
Milestone

Comments

@wolfv
Copy link

wolfv commented May 18, 2021

Describe the bug
I am recursing over a directory with symlinks inside. These symlinks have no valid target though. Unfortunately when running over this with a recursive directory iterator, it throws with "No such file or directory" when incrementing the iterator.

drwxr-xr-x  4 wolfvollprecht  staff  128 May 12 17:14 .
drwxr-xr-x  5 wolfvollprecht  staff  160 May 12 17:14 ..
lrwxrwxr-x  1 wolfvollprecht  staff   29 Feb 21 15:30 libcrypto.1.1.dylib -> ../../lib/libcrypto.1.1.dylib
lrwxrwxr-x  1 wolfvollprecht  staff   26 Feb 21 15:30 libssl.1.1.dylib -> ../../lib/libssl.1.1.dylib

To Reproduce
Downloading, unpacking and iterating over the contents of this file https://anaconda.org/conda-forge/mysql-libs/8.0.23/download/osx-64/mysql-libs-8.0.23-hbeb7981_1.tar.bz2 should lead to the same issue. It contains the missing symlinks mentioned above. I observed this on macOS only so far.

The STL implementation does not have this problem.

This came up in mamba: mamba-org/mamba#950

Expected behavior
I'd like the iterator to move to the next item.

@gulrak
Copy link
Owner

gulrak commented May 18, 2021

Thanks for reporting, I'll look into it.

@gulrak gulrak added the bug Something isn't working label May 18, 2021
@gulrak gulrak self-assigned this May 18, 2021
@gulrak gulrak added this to the v1.5.6 milestone May 18, 2021
@gulrak gulrak added POSIX POSIX type backend is affected available on master Fix is done on master branch, issue closed on next release labels May 22, 2021
@gulrak
Copy link
Owner

gulrak commented May 24, 2021

This is now part of release v1.5.6

@gulrak gulrak closed this as completed May 24, 2021
@wolfv
Copy link
Author

wolfv commented May 24, 2021

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
available on master Fix is done on master branch, issue closed on next release bug Something isn't working POSIX POSIX type backend is affected
Projects
None yet
Development

No branches or pull requests

2 participants