+2008-02-10 Micah Cowan <micah@cowan.name>
+
+ * http.c: Added existence_checked member to the http_stat
+ struct.
+ (gethttp): Mark hs->existence_checked when we've checked whether
+ a file-to-download exists; so we don't check it again if the
+ connection gets lost (and potentially pick a new "unique" name).
+ This fixes bug 22251.
+ * progress.c (create_image): Add space for an extra column in
+ the "eta" portion of the progress bar image; to deal with
+ too-long Czech translation.
+
2008-02-07 Micah Cowan <micah@cowan.name>
* progress.c (create_image): Remove assertion on exceeding
double dltime; /* time it took to download the data */
const char *referer; /* value of the referer header. */
char *local_file; /* local file name. */
+ bool existence_checked; /* true if we already checked for a file's
+ existence after having begun to download
+ (needed in gethttp for when connection is
+ interrupted/restarted. */
bool timestamp_checked; /* true if pre-download time-stamping checks
* have already been performed */
char *orig_file_name; /* name of file to compare for time-stamping
}
/* TODO: perform this check only once. */
- if (file_exists_p (hs->local_file))
+ if (!hs->existence_checked && file_exists_p (hs->local_file))
{
if (opt.noclobber)
{
hs->local_file = unique;
}
}
+ hs->existence_checked = true;
/* Support timestamping */
/* TODO: move this code out of gethttp. */
"[]" - progress bar decorations - 2 chars
" nnn,nnn,nnn" - downloaded bytes - 12 chars or very rarely more
" 12.5K/s" - download rate - 8 chars
- " eta 36m 51s" - ETA - 13 chars
+ " eta 36m 51s" - ETA - 14 chars
"=====>..." - progress bar - the rest
*/
int dlbytes_size = 1 + MAX (size_grouped_len, 11);
- int progress_size = bp->width - (4 + 2 + dlbytes_size + 8 + 13);
+ int progress_size = bp->width - (4 + 2 + dlbytes_size + 8 + 14);
if (progress_size < 5)
progress_size = 0;