https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=169748

Thomas Hurst <t...@hur.st> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |t...@hur.st

--- Comment #4 from Thomas Hurst <t...@hur.st> ---
+               if (fetchStatURL(urls[i], &ustat, "") == -1) {
+                       snprintf(errormsg, sizeof(errormsg),
+                           "Error while determining file size for %s: %s\n",
+                           urls[i], fetchLastErrString);
+                       items[i*2 + 1] = "Failed";
+                       dialog_msgbox("Fetch Error", errormsg, 0, 0,
+                           TRUE);
+                       return (-1);
+               }

I'd suggest it best here just to quietly reset total_bytes = 0 and abort trying
to get the sizes up-front.  HEAD requests failing isn't fatal, the code can
fall back to just calculating percentage from the number of files.

I've seen this sort of thing more than once:
https://www.reddit.com/r/freebsd/comments/g7gdc9/is_that_normal_overall_progress_208/

i.e. *only* the first fetchStatURL() failed.  Resetting total_bytes to 0 would
have left them with a functional but coarse-grained total progress bar, while
this patch would have errored out the entire operation.

-- 
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
freebsd-bugs@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-bugs
To unsubscribe, send any mail to "freebsd-bugs-unsubscr...@freebsd.org"

Reply via email to