mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-03-31 04:23:40 +00:00
return correct error on failed os download (#1636)
This commit is contained in:
@@ -356,7 +356,12 @@ async fn write_stream_to_label<Db: DbHandle>(
|
|||||||
pin!(stream_download);
|
pin!(stream_download);
|
||||||
let mut downloaded = 0;
|
let mut downloaded = 0;
|
||||||
let mut last_progress_update = Instant::now();
|
let mut last_progress_update = Instant::now();
|
||||||
while let Some(Ok(item)) = stream_download.next().await {
|
while let Some(item) = stream_download
|
||||||
|
.next()
|
||||||
|
.await
|
||||||
|
.transpose()
|
||||||
|
.with_kind(ErrorKind::Network)?
|
||||||
|
{
|
||||||
file.write_all(&item)
|
file.write_all(&item)
|
||||||
.await
|
.await
|
||||||
.with_kind(ErrorKind::Filesystem)?;
|
.with_kind(ErrorKind::Filesystem)?;
|
||||||
|
|||||||
Reference in New Issue
Block a user