mirror of
https://github.com/bootandy/dust.git
synced 2025-12-05 20:40:11 -08:00
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 84fa0ea9a4.
* fix: interrupted error, set limit to 999 instead.
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user