From 0a81bd5d5ad59cf6b183feeaaa31f9099dc2316c Mon Sep 17 00:00:00 2001 From: Timo Nicolai Date: Fri, 9 Jun 2023 15:30:41 +0200 Subject: [PATCH] depot_download_manager: fix verifying failed download In some instances, the fetchurl progress determined by depot_download_manager will be empty when the download fails (e.g. due to a 404), this commit fixes a bug where this would be interpreted as the download having completed which would subsequently start hash verification of a package that has never actually been downloaded. Fixes #4919 --- repos/gems/src/app/depot_download_manager/import.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/repos/gems/src/app/depot_download_manager/import.h b/repos/gems/src/app/depot_download_manager/import.h index fa56b36d26..50b78dedd1 100644 --- a/repos/gems/src/app/depot_download_manager/import.h +++ b/repos/gems/src/app/depot_download_manager/import.h @@ -44,6 +44,10 @@ class Depot_download_manager::Import bool complete() const { + /* fetchurl did not return valid download info */ + if (total == "") + return false; + /* fetchurl has not yet determined the file size */ if (total == "0.0") return false;