Hmm - changing the rename schema would potentially create a HUGE issue with
clobbering.

For example, and quite hypothetical...

Given a directory with the following:
  index.html
  index-1.html
  index.1.html

All three are served by the server and rendered by the browser.  They are
distinct files given the file system and the URL interpretation of the file
system by the web server.

Now, Wget downloads index.html, then downloads it again.  Our choices for
the second file are:
  1) index.html.1
  2) index-1.html
  3) index.1.html

Of the three, only #1 is pretty much guaranteed *not* to exist on the web
server.  Why?  Because by changing the extension, we've changed the content
type.  So if our intentions are to not clobber (which, I believe, is the
whole point) we are *much* better off sticking with the current schema and
creating a file that most can't be served by the web server.

Note that this is quite a contrived example to illustrate the point.


However, my 2 cents on the behavior - It would be *wonderful* if wget could
look at the local file system and rename each version to file.ext.n+1 so the
new download is index.html, not index.html.1.  I've been caught a couple of
times with this, so to me the default behavior is backwards (ie, new file
s/b the URL, older files get versioned)

Chris


Christopher G. Lewis
http://www.ChristopherLewis.com
 

> -----Original Message-----
> From: Hrvoje Niksic [mailto:[EMAIL PROTECTED] 
> Sent: Sunday, November 04, 2007 4:19 PM
> To: Wget
> Cc: Christian Roche
> Subject: Re: .1, .2 before suffix rather than after
> 
> Hrvoje Niksic <[EMAIL PROTECTED]> writes:
> 
> > Micah Cowan <[EMAIL PROTECTED]> writes:
> >
> >> Christian Roche has submitted a revised version of a patch 
> to modify
> >> the unique-name-finding algorithm to generate names in the pattern
> >> "foo-n.html" rather than "foo.html.n". The patch looks good, and
> >> will likely go in very soon.
> >
> > foo.html.n has the advantage of simplicity: you can tell at a glance
> > that <foo>.n is a duplicate of <foo>.  Also, it is trivial to remove
> > the unwanted files by removing <foo>.*.
> 
> It just occurred to me that this change breaks backward compatibility.
> It will break scripts that try to clean up after Wget or that in any
> way depend on the current naming scheme.
> 

Attachment: smime.p7s
Description: S/MIME cryptographic signature

Reply via email to