You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Circular directories result in infinite loop when recursive pattern is used #8736
mkdir root/p/1 root/etc/apt; touch root/etc/apt/sources.list
^ln -s ../.. root/p/1/cwd; cd root
ls **/sources.list | length # 41
The glob follows the loop until the symlink limit of the kernel.
With a second loop link it ends in "Too many levels of symbolic links" or doesn't finish at all.
Hey! I opened #19622 to fix this. Recursive globs now stop descending when a symlink leads back to an ancestor. I verified on macOS that both glob backends still find the file and continue searching sibling directories.
Activity
Cookie04DE commentedon Apr 4, 2023
I found this workaround for now:
ls **/sources.list | compact | firstkronberger-droid commentedon Nov 13, 2026
Still reproduces on 0.117.
The glob follows the loop until the symlink limit of the kernel.
With a second loop link it ends in "Too many levels of symbolic links" or doesn't finish at all.
manavkdubey commentedon Nov 20, 2026
Hey! I opened #19622 to fix this. Recursive globs now stop descending when a symlink leads back to an ancestor. I verified on macOS that both glob backends still find the file and continue searching sibling directories.
fix(glob): prevent directory symlink cycles during traversal (nushell…