X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FFile%2FPath.pm;h=10ae398b67688f56c983da7d8672ba0767aaa1aa;hb=7068481feb3366fc94b17a90a2eed90f87afc5a0;hp=3560a970a26c2b32b6638f07a3a59e800888cb1f;hpb=3b825e419da1c361eab06a1e6d287276c0aef241;p=p5sagit%2Fp5-mst-13.2.git diff --git a/lib/File/Path.pm b/lib/File/Path.pm index 3560a97..10ae398 100644 --- a/lib/File/Path.pm +++ b/lib/File/Path.pm @@ -98,7 +98,7 @@ use Exporter (); use strict; use warnings; -our $VERSION = "1.0405"; +our $VERSION = "1.05"; our @ISA = qw( Exporter ); our @EXPORT = qw( mkpath rmtree ); @@ -180,7 +180,13 @@ sub rmtree { unless $safe; if (opendir my $d, $root) { - @files = readdir $d; + no strict 'refs'; + if (!defined ${"\cTAINT"} or ${"\cTAINT"}) { + # Blindly untaint dir names + @files = map { /^(.*)$/s ; $1 } readdir $d; + } else { + @files = readdir $d; + } closedir $d; } else {