From: José Pedro Oliveira Date: Tue, 7 Jun 2005 21:07:42 +0000 (+0100) Subject: Re: FindBin.pm: incomplete getcwd/cwd patch and SELinux (Strict policy) X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=942068f5eb2e4323f0443fdb27a222fde20b6e6d;p=p5sagit%2Fp5-mst-13.2.git Re: FindBin.pm: incomplete getcwd/cwd patch and SELinux (Strict policy) Message-ID: <42A5FE8E.3020608@di.uminho.pt> p4raw-id: //depot/perl@24753 --- diff --git a/lib/FindBin.pm b/lib/FindBin.pm index 353a904..0dbe550 100644 --- a/lib/FindBin.pm +++ b/lib/FindBin.pm @@ -104,7 +104,7 @@ use File::Spec; %EXPORT_TAGS = (ALL => [qw($Bin $Script $RealBin $RealScript $Dir $RealDir)]); @ISA = qw(Exporter); -$VERSION = "1.46"; +$VERSION = "1.47"; sub cwd2 { my $cwd = getcwd(); @@ -188,7 +188,11 @@ sub init } # Get absolute paths to directories - $Bin = abs_path($Bin) if($Bin); + if ($Bin) { + my $BinOld = $Bin; + $Bin = abs_path($Bin); + defined $Bin or $Bin = File::Spec->canonpath($BinOld); + } $RealBin = abs_path($RealBin) if($RealBin); } }