[Lxr-commits] CVS: lxr/lib/LXR/Files Plain.pm,1.18,1.19
Brought to you by:
ajlittoz
From: Malcolm B. <mb...@us...> - 2002-02-26 15:57:58
|
Update of /cvsroot/lxr/lxr/lib/LXR/Files In directory usw-pr-cvs1:/tmp/cvs-serv22319 Modified Files: Plain.pm Log Message: Add mode specifications to all opens, to prevent filenames being interpreted as modes Index: Plain.pm =================================================================== RCS file: /cvsroot/lxr/lxr/lib/LXR/Files/Plain.pm,v retrieving revision 1.18 retrieving revision 1.19 diff -u -d -r1.18 -r1.19 --- Plain.pm 3 Feb 2002 08:22:08 -0000 1.18 +++ Plain.pm 26 Feb 2002 15:57:55 -0000 1.19 @@ -59,7 +59,7 @@ my ($buffer); local ($/) = undef; - open(FILE, $self->toreal($filename, $release)) || return undef; + open(FILE, "<", $self->toreal($filename, $release)) || return undef; $buffer = <FILE>; close(FILE); return $buffer; @@ -80,7 +80,7 @@ $tmp = $config->tmpdir.'/lxrtmp.'.time.'.'.$$.'.'.&LXR::Common::tmpcounter; open(TMP, "> $tmp") || return undef; - open(FILE, $self->toreal($filename, $release)) || return undef; + open(FILE, "<", $self->toreal($filename, $release)) || return undef; print(TMP <FILE>); close(FILE); close(TMP); @@ -147,7 +147,7 @@ my $indexname = $self->toreal($pathname, $release)."00-INDEX"; if (-f $indexname) { - open(INDEX, $indexname) || + open(INDEX, "<", $indexname) || warning("Existing $indexname could not be opened."); local($/) = undef; $index = <INDEX>; |