From 81722b695dc551c2977221e04325c47a24d6b8db Mon Sep 17 00:00:00 2001 From: "andy.boot" Date: Sat, 5 Jul 2025 10:01:10 +0100 Subject: [PATCH] fix: dir_walker interrupted error (#507) * fix: dir_walker interrupted error Ignore and continue if we get many interrupted errors instead of panicing on 3. This is from user feedback who reported occasional panics from too many interrupted errors https://github.com/bootandy/dust/issues/495#issuecomment-3026673312 * Revert "fix: dir_walker interrupted error" This reverts commit 84fa0ea9a4bb383c2db7f3c7f3084d4271fc54bb. * fix: interrupted error, set limit to 999 instead. --- src/dir_walker.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/dir_walker.rs b/src/dir_walker.rs index c8779b2..e9174b3 100644 --- a/src/dir_walker.rs +++ b/src/dir_walker.rs @@ -305,7 +305,9 @@ fn handle_error_and_retry(failed: &Error, dir: &Path, walk_data: &WalkData) -> b } std::io::ErrorKind::Interrupted => { editable_error.interrupted_error += 1; - if editable_error.interrupted_error > 3 { + // This does happen on some systems. It was set to 3 but sometimes dust runs would exceed this + // However, if there is no limit this results in infinite retrys and dust never finishes + if editable_error.interrupted_error > 999 { panic!("Multiple Interrupted Errors occurred while scanning filesystem. Aborting"); } else { return true;