1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-10 07:04:03 +00:00
freebsd-ports/ftp/fmirror/files/patch-fmirror.c
Simon Barner 491be68d30 - Fix mirroring the root directory of an FTP server [1].
The original author's email address bounces, so this is fixed here.
- Move patch from patch-aa to patch-fmirror.c

Submitted by:	Fred Cox <sailorfred@yahoo.com>
Approved by:	Xavier Beaudouin <kiwi@oav.net> (maintainer)
PR:		ports/81787
2005-06-07 08:47:46 +00:00

21 lines
596 B
C

--- fmirror.c.orig Tue Jun 7 10:39:35 2005
+++ fmirror.c Tue Jun 7 10:39:44 2005
@@ -642,7 +642,7 @@
va_list args;
va_start(args, format);
vsprintf(buffer, format, args);
- l = fprintf(out_file, "%s\n", buffer);
+ l = fprintf(out_file, "%s\r\n", buffer);
fflush(out_file);
buffer[l - 1] = 0;
LOG(6, cmd, ("---> %s", buffer));
@@ -934,7 +934,7 @@
if (gotodir) {
cmd("CWD %s", gotodir);
- if (!success()) {
+ if (!success() && strcmp(gotodir, "/") != 0) {
LOG(4, findtz, ("Cannot CWD %s for timezone", gotodir));
gotodir = 0;
goto dirdone;