[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: CRITICAL BUG: wget -N is leaving corrupted files
From: |
Derek Martin |
Subject: |
Re: CRITICAL BUG: wget -N is leaving corrupted files |
Date: |
Wed, 12 Jun 2024 14:57:02 -0400 |
On Wed, Jun 12, 2024 at 02:14:13PM -0400, Derek Martin wrote:
> On Sat, Jun 08, 2024 at 07:21:14PM +0200, Tim Rühsen wrote:
> > What other options do we have to make --if-modified-since workable in your
> > scenario? (Apart from switching --if-modified-since off)
> >
> > a) When you download a file, use a temporary file name. After wget exists,
> > check the return status and if it is 0, rename the file.
> >
> > The downside is that you always have download the file, even if it didn't
> > change.
>
> I think this is probably the right solution, except:
>
> 1. ALWAYS rename the file, even if the download fails / is
> interrupted.
[...]
Although, TBH, just restoring the original behavior with head requests
seems like it would be significantly simpler. And for me personally,
where I live in StrangeWorld where renames are extremely expensive
(essentially copy + delete), would also be a lot more efficient.
Looking at the other options, I do think restoring the original
behavior is the best one.