Skip to content

Commit

Permalink
download_sysext: download first, check later
Browse files Browse the repository at this point in the history
We need to first download files, and then check its valitidy later.
Otherwise, check_download will simply fail in the beginning, due to
missing files.
  • Loading branch information
dongsupark committed Nov 3, 2023
1 parent eba91a3 commit c589a61
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/bin/download_sysext.rs
Original file line number Diff line number Diff line change
Expand Up @@ -262,10 +262,10 @@ async fn main() -> Result<(), Box<dyn Error>> {
let client = reqwest::Client::new();

for pkg in pkgs_to_dl.iter_mut() {
pkg.check_download(&unverified_dir)?;

pkg.download(&unverified_dir, &client).await?;

pkg.check_download(&unverified_dir)?;

let pkg_unverified = unverified_dir.join(&*pkg.name);
let pkg_verified = output_dir.join(&*pkg.name);

Expand Down

0 comments on commit c589a61

Please sign in to comment.