Skip to content

Commit cd3a10f

Browse files
authored
Capturing IO error in download_file_with_resume (#3421)
1 parent 865d699 commit cd3a10f

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/utils/utils.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,9 @@ pub(crate) fn download_file_with_resume(
151151
match download_file_(url, path, hasher, resume_from_partial, notify_handler) {
152152
Ok(_) => Ok(()),
153153
Err(e) => {
154+
if let Some(_) = e.downcast_ref::<std::io::Error>() {
155+
return Err(e);
156+
}
154157
let is_client_error = match e.downcast_ref::<DEK>() {
155158
// Specifically treat the bad partial range error as not our
156159
// fault in case it was something odd which happened.

0 commit comments

Comments
 (0)