[Lxr-commits] CVS: lxr/lib/LXR/Files CVS.pm,1.34,1.35
Brought to you by:
ajlittoz
From: Malcolm B. <mb...@us...> - 2009-03-24 20:04:28
|
Update of /cvsroot/lxr/lxr/lib/LXR/Files In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv11218/lib/LXR/Files Modified Files: CVS.pm Log Message: Fix bug [ 1111786 ] Failure to open file not detected Fix as per defect report - check return status from open() rather than filehandle Index: CVS.pm =================================================================== RCS file: /cvsroot/lxr/lxr/lib/LXR/Files/CVS.pm,v retrieving revision 1.34 retrieving revision 1.35 diff -u -d -r1.34 -r1.35 --- CVS.pm 4 Apr 2006 22:23:47 -0000 1.34 +++ CVS.pm 24 Mar 2009 20:04:23 -0000 1.35 @@ -173,9 +173,11 @@ $clean_filename = $1; # technically untaint here (cleanstring did the real untainting) $ENV{'PATH'} = $self->{'path'}; - open($fileh, "-|", "co -q -p$rev $clean_filename"); + my $rtn; + $rtn = open($fileh, "-|", "co -q -p$rev $clean_filename"); + + die("Error executing \"co\"; rcs not installed?") unless $rtn; - die("Error executing \"co\"; rcs not installed?") unless $fileh; return $fileh; } |