File tree Expand file tree Collapse file tree 2 files changed +22
-9
lines changed
Expand file tree Collapse file tree 2 files changed +22
-9
lines changed Original file line number Diff line number Diff line change @@ -382,9 +382,14 @@ impl<'a> OmaRefresh<'a> {
382382 . await
383383 . map_err ( RefreshError :: DownloadManagerBuilderError ) ?;
384384
385- if !res. is_download_success ( ) {
386- return Err ( RefreshError :: DownloadFailed ( None ) ) ;
387- }
385+ if !res. is_download_success ( )
386+ && res
387+ . failed
388+ . iter ( )
389+ . any ( |file_name| file_name. contains ( "_Packages" ) )
390+ {
391+ return Err ( RefreshError :: DownloadFailed ( None ) ) ;
392+ }
388393
389394 Ok ( res)
390395 }
Original file line number Diff line number Diff line change @@ -357,13 +357,21 @@ impl OmaMultiProgressBar {
357357 debug ! ( "{:#?}" , errs) ;
358358 }
359359
360- fn error_display ( & mut self , file_name : & String , is_refresh : bool , reason : String ) {
360+ fn error_display ( & mut self , file_name : & str , is_refresh : bool , reason : String ) {
361361 if is_refresh {
362- self . error ( & fl ! (
363- "download-file-failed-with-reason" ,
364- filename = file_name,
365- reason = reason
366- ) ) ;
362+ if file_name. contains ( "_Packages" ) || file_name. contains ( "Release" ) {
363+ self . error ( & fl ! (
364+ "download-file-failed-with-reason" ,
365+ filename = file_name,
366+ reason = reason
367+ ) ) ;
368+ } else {
369+ self . warn ( & fl ! (
370+ "download-file-failed-with-reason" ,
371+ filename = file_name,
372+ reason = reason
373+ ) ) ;
374+ }
367375 } else {
368376 self . error ( & fl ! (
369377 "download-package-failed-with-reason" ,
You can’t perform that action at this time.
0 commit comments