Re: PAR + tmpwatch = mess

[email protected] (Roderich Schupp)
Newsgroups perl.par
Message-ID <CAC9r9zb+TujJ2xqciPZHJWNQK6dxaaNqL4VhTV2nUb31vBCzQA@mail.gmail.com>
On Wed, May 13, 2015 at 12:00 AM, Shawn Laffan <[email protected]>
wrote:

> It could do with some review,


Shawn,
sorry for not having looked at this earlier: your patch doesn't solve the
problem at all.
It adds a canary file, alright, but the real problem is that Archive::Zip
(method extractMember)
extractsfiles with their original last modified timestamp restored.
That way you will always have extracted files that are older than the
canary, hence
will be removed by cleaning programs before they ever catch up with the
canary.

So first order of business would be to prevent Archive::Zip from doing that.
Unfortunately this behaviour is hard coded, so we must resort to reset the
last modified time (to "now") ourselves _after_ files have been extracted
(at least in
in PAR::_extract_inc(), but there may be other callers of
Archive::Zip::extract* methods).

Also I don't see the need for PAR::Packer to include the canary file in the
.par archive.
Just create it after the initial extraction phase and set its last modified
time
to something like "24 hours ago".

Cheers, Roderich
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.