Date: Wed, 5 Oct 2005 13:12:26 +0200 (CEST) From: Florent Thoumie <flz@xbsd.org> To: FreeBSD-gnats-submit@FreeBSD.org Cc: des@FreeBSD.org Subject: bin/86940: src/usr.bin/fetch - fix mirror mode (-m) Message-ID: <20051005111226.42F9E11598@smtp.xbsd.org> Resent-Message-ID: <200510051120.j95BKHaa032301@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>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@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:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20051005111226.42F9E11598>