mirror of
https://github.com/bootandy/dust.git
synced 2026-06-08 11:29:05 +03:00
feat: Listen for ctrl-c
before ctrl-c would not cancel a running job.
This commit is contained in:
@@ -130,6 +130,9 @@ fn ignore_file(entry: &DirEntry, walk_data: &WalkData) -> bool {
|
||||
fn walk(dir: PathBuf, walk_data: &WalkData, depth: usize) -> Option<Node> {
|
||||
let prog_data = &walk_data.progress_data;
|
||||
let errors = &walk_data.errors;
|
||||
if errors.lock().unwrap().abort {
|
||||
return None;
|
||||
}
|
||||
|
||||
let children = if dir.is_dir() {
|
||||
let read_dir = fs::read_dir(&dir);
|
||||
|
||||
Reference in New Issue
Block a user