diff --git a/src/ChangeLog b/src/ChangeLog index aca389f1..cd5f2eee 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2009-05-28 Steven Schubiger + + * ftp.c (ftp_get_listing): Update the "listing file" + string after calling ftp_loop_internal(). + 2009-05-27 Steven Schubiger * ftp.c (ftp_get_listing): Duplicate the "listing file" diff --git a/src/ftp.c b/src/ftp.c index d58d67df..171a38a4 100644 --- a/src/ftp.c +++ b/src/ftp.c @@ -1371,7 +1371,9 @@ ftp_get_listing (struct url *u, ccon *con, struct fileinfo **f) DEBUGP ((_("Using %s as listing tmp file.\n"), quote (lf))); con->target = xstrdup (lf); + xfree (lf); err = ftp_loop_internal (u, NULL, con); + lf = xstrdup (con->target); xfree (con->target); con->target = old_target;