bin/86940: src/usr.bin/fetch - fix mirror mode (-m)
Florent Thoumie
flz at xbsd.org
Wed Oct 5 04:20:19 PDT 2005
>Number: 86940
>Category: bin
>Synopsis: src/usr.bin/fetch - fix mirror mode (-m)
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Wed Oct 05 11:20:17 GMT 2005
>Closed-Date:
>Last-Modified:
>Originator: Florent Thoumie
>Release: FreeBSD 5.3-RELEASE i386
>Organization:
Xbsd.org
>Environment:
System: FreeBSD srv1.xbsd.org 5.3-RELEASE FreeBSD 5.3-RELEASE #2: Wed Nov 24 16:35:34 CET 2004 root at gate.xbsd.org:/usr/src/sys/i386/compile/GATE i386
>Description:
Mirror mode is actually not working because the size of local file
is always set to -1.
Maintainer (des@) CC'ed.
>How-To-Repeat:
Fetch one file, then try to re-fetch it with -am option.
>Fix:
--- fetch.c.diff begins here ---
Index: fetch.c
===================================================================
RCS file: /home/ncvs/src/usr.bin/fetch/fetch.c,v
retrieving revision 1.75
diff -u -r1.75 fetch.c
--- fetch.c 18 Nov 2004 12:01:30 -0000 1.75
+++ fetch.c 5 Oct 2005 11:04:10 -0000
@@ -418,7 +418,7 @@
sb.st_size = -1;
if (!o_stdout) {
r = stat(path, &sb);
- if (r == 0 && r_flag && S_ISREG(sb.st_mode)) {
+ if (r == 0 && (r_flag || m_flag) && S_ISREG(sb.st_mode)) {
url->offset = sb.st_size;
} else {
/*
--- fetch.c.diff ends here ---
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-bugs
mailing list