]> sjero.net Git - wget/commitdiff
Don't append to an existing .listing when --continue is used. Fixes bug #22825.
authorMicah Cowan <micah@cowan.name>
Fri, 11 Apr 2008 23:28:24 +0000 (16:28 -0700)
committerMicah Cowan <micah@cowan.name>
Fri, 11 Apr 2008 23:28:24 +0000 (16:28 -0700)
doc/ChangeLog
doc/wget.texi
src/ChangeLog
src/ftp.c

index 343f09f73a370af2156b8150d7e08828859aeeb8..c5614d4ae2a27b5b7a8588f559237c5c7848796c 100644 (file)
@@ -1,3 +1,8 @@
+2008-04-11  Micah Cowan  <micah@cowan.name>
+
+       * wget.texi <Contributors>: Added Julien Buty, Alexander
+       Dergachev, and Rabin Vincent.
+
 2008-03-24  Micah Cowan  <micah@cowan.name>
 
        * wget.texi <Types of Fields>: Mentioned various caveats in the
index cd97bcf0b9007f7a4a165f897c292bfa1f5443fc..583c7fcf2ab370df8583ab45f17d202cef2a8b98 100644 (file)
@@ -3770,6 +3770,7 @@ Paul Bludov,
 Daniel Bodea,
 Mark Boyns,
 John Burden,
+Julien Buty,
 Wanderlei Cavassin,
 Gilles Cedoc,
 Tim Charron,
@@ -3785,6 +3786,7 @@ Andreas Damm,
 Ahmon Dancy,
 Andrew Davison,
 Bertrand Demiddelaer,
+Alexander Dergachev,
 Andrew Deryabin,
 Ulrich Drepper,
 Marc Duponcheel,
@@ -3938,6 +3940,7 @@ Philipp Thomas,
 Mauro Tortonesi,
 Dave Turner,
 Gisle Vanem,
+Rabin Vincent,
 Russell Vincent,
 @iftex
 @v{Z}eljko Vrba,
index fddcefd4897d1650c6d9d911135bf341913d35b9..23a422d7f0943eb85fd52eab6d904845048322d3 100644 (file)
@@ -4,6 +4,13 @@
        "unknown" value for the attempted allocation size.
        * utils.c (aprintf): Now calls memfatal, instead of aborting.
 
+2008-04-11  Micah Cowan  <micah@cowan.name>
+
+       * ftp.c (getftp, ftp_loop_internal): Don't append to an existing
+       .listing when --continue is used.  Fixes bug #22825. Thanks to
+       Rabin Vincent <rabin@rab.in> for pointing the way with a
+       suggested fix!
+
 2008-03-19  Micah Cowan  <micah@cowan.name>
 
        * utils.c (test_dir_matches_p): More tests related for
index 115cc5c40d837ffd004a0a4797b16a3e94e35a5d..0321032168487d2eff9b66a13de03595b531ae4a 100644 (file)
--- a/src/ftp.c
+++ b/src/ftp.c
@@ -918,7 +918,7 @@ Error in server response, closing control connection.\n"));
       if (opt.backups)
         rotate_backups (con->target);
 
-      if (restval)
+      if (restval && !(con->cmd & DO_LIST))
         fp = fopen (con->target, "ab");
       else if (opt.noclobber || opt.always_rest || opt.timestamping || opt.dirstruct
                || opt.output_document)
@@ -1141,7 +1141,9 @@ ftp_loop_internal (struct url *u, struct fileinfo *f, ccon *con)
         }
 
       /* Decide whether or not to restart.  */
-      if (opt.always_rest
+      if (con->cmd & DO_LIST)
+        restval = 0;
+      else if (opt.always_rest
           && stat (locf, &st) == 0
           && S_ISREG (st.st_mode))
         /* When -c is used, continue from on-disk size.  (Can't use