mirror of
https://github.com/bootandy/dust.git
synced 2026-06-08 11:29:05 +03:00
feat: Abort immedietly when ^C is received. (#478)
Previously, we attempted to perform a clean shutdown, which could take a significant period of time on slow filesystems. This commit changes the shutdown logic to abort immedietly when ^C is received by the program.
This commit is contained in:
@@ -206,10 +206,6 @@ 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);
|
||||
match read_dir {
|
||||
|
||||
Reference in New Issue
Block a user