mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-03-26 02:11:53 +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);
|
||||
let mut downloaded = 0;
|
||||
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)
|
||||
.await
|
||||
.with_kind(ErrorKind::Filesystem)?;
|
||||
|
||||
Reference in New Issue
Block a user