Skip to content

Commit

Permalink
error logging for failed/retry download
Browse files Browse the repository at this point in the history
  • Loading branch information
mxve committed Sep 18, 2024
1 parent 252ac66 commit 35ec579
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -278,13 +278,17 @@ async fn update_dir(
)
.await
{
println!(
"Failed to download file {}, retry? (Y/n)",
file_path.clone().display()
);
let file_name = file_path.clone().cute_path();
println_error!("{err}");
println!("Failed to download file {file_name}, retry? (Y/n)");
let input = misc::stdin().to_ascii_lowercase();
if input == "n" {
error!("Download for file {file_name} failed with {err}");
panic!("{err}");
} else {
warn!(
"Download for file {file_name} failed with {err} user chose to retry download"
);
}
};
download_complete = true;
Expand Down

0 comments on commit 35ec579

Please sign in to comment.