Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?

Re^2: Creating a tarball

by Tux (Canon)
on Feb 07, 2019 at 07:30 UTC ( #1229520=note: print w/replies, xml ) Need Help??

in reply to Re: Creating a tarball
in thread Creating a tarball

I'd guard that against unreadable files:

sub { -f || -d and push @filenamelist, "$_" }, => sub { -f || -d and -r and push @filenamelist, "$_" },

Enjoy, Have FUN! H.Merijn

Replies are listed 'Best First'.
Re^3: Creating a tarball
by tybalt89 (Prior) on Feb 07, 2019 at 07:41 UTC

    Which leads to the question: Should these files be silently ignored, or an error or warning be generated?

    (And code gets more and more complicated :)

Re^3: Creating a tarball
by kcott (Bishop) on Feb 07, 2019 at 12:39 UTC

    G'day Tux,

    You raise a good point and, in general, my code is littered with such checks. However, in this instance, the directory structure is generated afresh immediately before the tarball creation, and the spec requires all files in the directory structure to be readable. So, while that is something I would normally do, it's not needed in this particular situation. Thanks for mentioning it anyway.

    — Ken

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1229520]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (4)
As of 2022-05-20 20:42 GMT
Find Nodes?
    Voting Booth?
    Do you prefer to work remotely?

    Results (76 votes). Check out past polls.