Noèl Köthe <[EMAIL PROTECTED]> writes:
> a wget -c problem report with the 1.11 alpha 1 version
> (http://bugs.debian.org/378691):
>
> I can reproduce the problem. If I have already 1 MB downloaded wget -c
> doesn't continue. Instead it starts to download again:
Mauro, you will need to look at this one. Part of the problem is that
Wget decides to save to index.html.1 although -c is in use. That is
solved with the patch attached below. But the other part is that
hstat.local_file is a NULL pointer when
stat(hstat.local_file, &st) is used to determine whether the file
already exists in the -c case. That seems to be a result of your
changes to the code -- previously, hstat.local_file would get
initialied in http_loop.
The partial patch follows:
Index: src/http.c
===================================================================
--- src/http.c (revision 2178)
+++ src/http.c (working copy)
@@ -1762,7 +1762,7 @@
return RETROK;
}
- else
+ else if (!ALLOW_CLOBBER)
{
char *unique = unique_name (hs->local_file, true);
if (unique != hs->local_file)