From 65cc9922cd68e69ec0d14cbf678bf281d25c7dd4 Mon Sep 17 00:00:00 2001 From: Brandon Thomas Date: Fri, 5 Jun 2020 18:44:35 -0400 Subject: [PATCH] add warning --- src/main.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/main.rs b/src/main.rs index 0623c12085..d1e789d71a 100644 --- a/src/main.rs +++ b/src/main.rs @@ -108,7 +108,13 @@ impl BucketDownloader { let object_hash = Self::hash_object(object); // NB: Multipart-uploaded objects do not have an accurate md5 hash. + // The fix for this is to copy them, which recomputes the md5 wholesale. // Read more: https://stackoverflow.com/a/29350548 + if object_hash.contains("-") { + warn!("Multipart hash '{}' for file {}. This will continue to download indefinitely until fixed.", + object_hash, object.key); + } + if !file_hash.eq_ignore_ascii_case(&object_hash) { info!("File hash '{}' does not match object hash '{}' for file {}", file_hash, object_hash, object.key);