Skip to content

Recursive directory iterator tries to follow symlink on macOS #122

Closed
@wolfv

Description

@wolfv

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.

Metadata

Metadata

Assignees

Labels

POSIXPOSIX type backend is affectedavailable on masterFix is done on master branch, issue closed on next releasebugSomething isn't working

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions