Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re^2: Creating a tarball

by Tux (Canon)
on Feb 07, 2019 at 07:30 UTC ( [id://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 (Monsignor) 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 (Archbishop) 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?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others having a coffee break in the Monastery: (6)
As of 2024-04-23 23:56 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found