mirror of
https://github.com/sigoden/dufs.git
synced 2026-04-23 01:20:01 +03:00
[GH-ISSUE #683] Search stops early when WalkDir encounters broken symlinks #1770
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @dominikroblek on GitHub (Apr 9, 2026).
Original GitHub issue: https://github.com/sigoden/dufs/issues/683
Description
When
--allow-searchis enabled and the directory tree contains broken symlinks, search (?q=...) silently stops returning results for sibling directories that come after the directory containing the broken symlinks in filesystem order.Root cause
In
server.rs,collect_dir_entriesuses:WalkDir::new(&dir).follow_links(true)producesSome(Err(...))when it encounters a broken symlink. Thewhile let Some(Ok(entry))pattern doesn't matchSome(Err(...)), so the entire loop exits — skipping all remaining entries in the walk.Steps to reproduce
Expected behavior
Search should skip entries that produce errors (broken symlinks, permission errors, etc.) and continue walking the remaining directory tree.
Suggested fix
Replace:
With something like:
Environment
bin/pythonlinks pointing to a non-existent interpreter path