curl / curl-for-win

Reproducible curl binaries for Linux, macOS and Windows
https://curl.se/windows/
MIT License
686 stars 207 forks source link

`curl-7.73.0_3-win64-mingw.zip` has size 0.0 MB? #15

Closed simon04 closed 3 years ago

simon04 commented 3 years ago

On https://curl.se/windows/, the file https://curl.se/windows/dl-7.73.0_3/curl-7.73.0_3-win64-mingw.zip is listed with Size: 0.0 MB

vszakats commented 3 years ago

Indeed, I also noticed it, but the linked file is the correct one.

Assuming this was something transient, I'm pushing a revision trying to fix this.

simon04 commented 3 years ago

Thank you for the instant fix! :smile:

vszakats commented 3 years ago

You're welcome! But, it didn't fix it; now the 32-bit version appears as zero size. Can't readily see what may be the problem...

One thing definitely changed in curl-for-win with 7.73.0_3: Now each .zip and .tar.xz file comes with a GPG signature with a .asc suffix in their filenames.

If the logic accidentally picks the .asc file instead of the archive, it may result in a zero size when rounded to MB.

So perhaps this is the fix:

diff --git a/windows/mkfiles.pl b/windows/mkfiles.pl
index 1dbece7..db2194f 100755
--- a/windows/mkfiles.pl
+++ b/windows/mkfiles.pl
@@ -95,7 +95,7 @@ my $dl = latest();
 my @files = getdl($dl);
 for(@files) {
     my $file = $_;
-    if($file =~ /^curl-([0-9.]*(|_[0-9]*))-(\S+)-(\S+)\.(zip)/) {
+    if($file =~ /^curl-([0-9.]*(|_[0-9]*))-(\S+)-(\S+)\.(zip)$/) {
         my ($version, $arch, $env, $ext)=($1, $3, $4, $5);
         $exts{$version}.="$ext,";
         $archs{$version.$ext}.="$arch,";
vszakats commented 3 years ago

It looks like the fix worked for the latest pushed revision. Closing this for now. Thanks for the report!

bagder commented 3 years ago

:tada: