develooper Front page | perl.perl5.porters | Postings from October 2013

[perl #119755] [PATCH] 298de04 File::Find: diagnostics in case of a failed chdir

Thread Previous | Thread Next
From:
Victor Efimov via RT
Date:
October 3, 2013 09:03
Subject:
[perl #119755] [PATCH] 298de04 File::Find: diagnostics in case of a failed chdir
Message ID:
rt-3.6.HEAD-31239-1380791008-564.119755-15-0@perl.org
Find::Find still silently ignores permission problems when walking
directory tree.

$ mkdir X
$ mkdir X/Y
$ mkdir X/Y/Z
$ chmod 000 X/Y
$ ./perl -Ilib 1.pl
error for X/Y/Z: Permission denied
X/Y
X
$ cat 1.pl
use File::Find;
use Carp;

-e "X/Y/Z" or print STDERR "error for X/Y/Z: $!\n";

sub wanted { print $File::Find::name, "\n" }
find({ wanted => \&wanted, no_chdir => 0, bydepth => 1 }, 'X');

What this patch does, is, probably, report errors when you can't chdir
to directories like ".." (which is, indeed, more important).

I am wondering if this is intentional.

On Thu Sep 12 12:50:10 2013, sprout wrote:
> On Thu Sep 12 07:58:07 2013, slaven@rezic.de wrote:
> > This is a bug report for perl from slaven@rezic.de,
> > generated with the help of perlbug 1.39 running under perl 5.12.4.
> > 
> > From 298de04af95a10589a2d6c1d13658e4d2df0d648 Mon Sep 17 00:00:00 2001
> > From: Slaven Rezic <slaven@rezic.de>
> > Date: Thu, 12 Sep 2013 14:04:27 +0200
> > Subject: [PATCH] File::Find: diagnostics in case of a failed chdir
> > MIME-Version: 1.0
> > Content-Type: multipart/mixed; boundary="------------1.8.1.2"
> 
> Thank you.  Applied as 60a94a4822.
> 




---
via perlbug:  queue: perl5 status: resolved
https://rt.perl.org:443/rt3/Ticket/Display.html?id=119755

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About