-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Just getting a chance to look a bit more closely at this again.

Christian Roche wrote:
> Hi there,
> 
> please find attached two small patches that could be
> considered for wget (against revision 2276).
> 
> patch-utils changes the file renaming mechanism when
> the -nc option is in effect.  Instead of trying to
> rename  a file to file.1, file.2 etc, it tries
> prefix-1.suffix, prefix-2.suffix etc, thus preserving
> the filename extension if any.  This is necessary to
> avoid a bug otherwise when the -A option is used:
> renamed files are rejected because they don't match
> the required suffix, although they should really be
> kept.

Is this true? I'm having some trouble reproducing this, either now or in
older versions (1.10.2, 1.9.1), Could you supply a command-line that
produces this problem? ...Because, it seems that Wget will always accept
any file that was explicitly given on the command-line or via
- --input-file; and AFAICT .1, .2 suffixes are not generated in
- --recursive mode.

Your suffixes patch accidentally includes some of the documentation from
- --min-size/--max-size; I'd prefer this not to be part of this patch ;)

Also, the proposed code changes are fine, but IMO a little bit wasteful,
as it allocates strlen(s)-sized buffers for prefix and suffix. Actually,
it really shouldn't be necessary to allocate space for the prefix and
suffix at all, as you can just set markers for them, leaving just the
filename variable to be allocated.

If you can make those changes, I'll probably apply the patch right away;
otherwise, I'll probably wait until I have a chance to do that myself.
Even if the accept/reject thing doesn't apply, this patch has the
benefit of preserving interpretation of .html files, etc. But please let
me know how you were reproducing the accept/reject, as it would still
need a more robust fix.

- --
Thanks!
Micah J. Cowan
Programmer, musician, typesetting enthusiast, gamer...
http://micah.cowan.name/

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFHExDa7M8hyUobTrERCFcFAJwJRhLQTfqVeWCB/0ul+GMPW4PdDACdHyua
Sm3JnsEi6m6ZmRrCWzXcUbU=
=GNE5
-----END PGP SIGNATURE-----

Reply via email to