Seen this twice now but unable to track down how it happens.
I am crawling a list of websites which are being kept in a cache area.
My args (in ruby) are
ARGS = "--html-extension " +
"--page-requisites " +
"--force-directories " +
"--convert-links " +
"--directory-prefix=#{CBASE} " +
"--timestamping " +
"--user-agent='#{UA}' " +
"--output-file=#{TLOG} " +
"--tries=5 " +
" --timeout=180"
A small number of files end up in the wrong location, evidence from
the logs indicates that these
- are page requisite downloads, e.g. jpegs generally
- have a saved line of the form 'file.jpg' saved - i.e. no directory prefix
- are a small part of the overall crawl activity, most things get put
away properly
the html for these pages shows references to the offending item as
'../../../../../../ ..... file.jpg' (in the one case where I counted
../ is repeated 17 times)
the wget logs shows that after a spell of correctly saving requisites
for a site we get a run of these errors until the current download
finishes processing, each file erroneously saved is associated with a
log line like
Server file no newer than local file `filename.jpg' -- not retrieving.
However this is the *first occurence* of filename.jpg in the log
I am using Centos and the Centos build of wget, I have looked through
bug trackers in vain, is this a known problem with wget? with centos?
Repeating this particular event did not produce the same problem and
as my wget code has not changed I am assuming it is intermittent in
some fashion.