Skip to content
Myr

Avoid panic when sending errors after receiver shutdown

Before adoption: this commit came in with the history the project adopted, so no landing records it.

fixes #678

authored by sharkdp · committed by David Peter · parent e0adb45 · Browse files · 2 files+19 added−10 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

2 files+19 added−10 removed

  • other:+19 added−10 removed

2 files+19 added−10 removed

modified:src/walk.rs+18 added-10 removed
356 unmodified lines
357 {358 DirEntry::BrokenSymlink(path)359 }360 _ => {361 tx_thread362 .send(WorkerResult::Error(ignore::Error::WithPath {363 path,364 err: inner_err,365 }))366 .unwrap();361 match tx_thread.send(WorkerResult::Error(ignore::Error::WithPath {362 path,363 err: inner_err,364 })) {365 Ok(_) => {366 return ignore::WalkState::Continue;367 }368 Err(_) => {369 return ignore::WalkState::Quit;370 }371 }372 }373 },374 Err(err) => match tx_thread.send(WorkerResult::Error(err)) {375 Ok(_) => {376 return ignore::WalkState::Continue;377 }378 Err(_) => {379 return ignore::WalkState::Quit;380 }381 },370 Err(err) => {371 tx_thread.send(WorkerResult::Error(err)).unwrap();372 return ignore::WalkState::Continue;373 }382 };383384 if let Some(min_depth) = config.min_depth {385 if entry.depth().map_or(true, |d| d < min_depth) {
128 unmodified lines
modified:CHANGELOG.md+1 added
5 unmodified lines
6- Add new `--prune` flag, see #535 (@reima)78## Bugfixes910- Avoid panic when performing limited searches in directories with restricted permissions, see #67811- Invalid numeric command-line arguments are silently ignored, see #67512- Disable jemalloc on Android, see #6621314## Changes
478 unmodified lines