"Gisle Vanem" <[EMAIL PROTECTED]> writes:

> It seems touch() is called on an open file and hence utime() is
> either silently ignored or causing "Access denied" on Watcom.
[...]
>wget -d -Otcpdump.tgz http://www.tcpdump.org/daily/tcpdump-2003.09.29.tar.gz
> [touch] Should IMHO be called after the file is closed.

It is -- except when you specify -O.  Normally the output file is
closed in gethttp().  But when -O is used, Wget doesn't close the file
so it can continue to write to the same file descriptor for the next
URL.

The confusing thing with -O is that, as it now stands, it affects the
way Wget works in various strange ways.  It works differently because
it is meant to allow streaming, as in `wget -O - URL', or even
streaming of multiple URLs: `wget -O - URL1 URL2...'.  It's
questionable whether honoring Last-Modified even makes sense in that
case!

Wget already has code that closes and reopens "output document" if
it's a regular file.  Perhaps the same should be done here...

Reply via email to