mirror of
https://github.com/bootandy/dust.git
synced 2026-06-08 11:29:05 +03:00
[PR #568] fix: prevent panic on repeated EINTR errors during filesystem scanning #553
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?
📋 Pull Request Information
Original PR: https://github.com/bootandy/dust/pull/568
Author: @hieuit095
Created: 4/2/2026
Status: 🔄 Open
Base:
master← Head:main📝 Commits (1)
26a7404Prevent panic on repeated EINTR errors by gracefully skipping problematic directories📊 Changes
1 file changed (+5 additions, -1 deletions)
View changed files
📝
src/dir_walker.rs(+5 -1)📄 Description
When dust scans filesystems that return many EINTR errors (e.g., network filesystems like NFS or FUSE-based mounts), the previous code called panic after 999 consecutive interrupts, crashing the program. Replaced the panic with a warning message on stderr and a graceful skip of the problematic directory, allowing the scan to continue with remaining accessible paths.
Changes: src/dir_walker.rs - in handle_error_and_retry(), panic replaced with eprintln warning and return false when interrupted_error exceeds 999.
All 29 unit tests and 28 integration tests pass.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.