1
0
mirror of https://github.com/moparisthebest/wget synced 2024-07-03 16:38:41 -04:00

[svn] Delete trailing newlines from LIST output when -S is used.

This commit is contained in:
hniksic 2005-06-27 17:13:44 -07:00
parent 3d0fda1a28
commit 4aea3747e3
2 changed files with 8 additions and 0 deletions

View File

@ -1,3 +1,8 @@
2005-06-28 Hrvoje Niksic <hniksic@xemacs.org>
* ftp.c (getftp): Delete trailing newlines from LIST output so
lines don't come out with trailing \015\012 with -S.
2005-06-27 Hrvoje Niksic <hniksic@xemacs.org>
* mswindows.h: Remove superfluous includes.

View File

@ -1068,6 +1068,9 @@ Error in server response, closing control connection.\n"));
no-buffering on opt.lfile. */
while ((line = read_whole_line (fp)) != NULL)
{
char *p = strchr (line, '\0');
while (p > line && (p[-1] == '\n' || p[-1] == '\r'))
*--p = '\0';
logprintf (LOG_ALWAYS, "%s\n", escnonprint (line));
xfree (line);
}