Skip to content

Commit

Permalink
Capturing IO error in download_file_with_resume (#3421)
Browse files Browse the repository at this point in the history
  • Loading branch information
ongchi authored Oct 6, 2023
1 parent 865d699 commit cd3a10f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/utils/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,9 @@ pub(crate) fn download_file_with_resume(
match download_file_(url, path, hasher, resume_from_partial, notify_handler) {
Ok(_) => Ok(()),
Err(e) => {
if let Some(_) = e.downcast_ref::<std::io::Error>() {
return Err(e);
}
let is_client_error = match e.downcast_ref::<DEK>() {
// Specifically treat the bad partial range error as not our
// fault in case it was something odd which happened.
Expand Down

0 comments on commit cd3a10f

Please sign in to comment.