summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorin2 <in2@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2003-07-04 11:23:19 +0800
committerin2 <in2@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2003-07-04 11:23:19 +0800
commit2b6b20e55b9f9c8b641fc49313d74d592813f5dd (patch)
tree7f94acdff0b07202bb94e31cb77f8ddb7e7f5a9f
parent07ba1ee3d555817b56dcfc35618d170ff2359277 (diff)
downloadpttbbs-2b6b20e55b9f9c8b641fc49313d74d592813f5dd.tar
pttbbs-2b6b20e55b9f9c8b641fc49313d74d592813f5dd.tar.gz
pttbbs-2b6b20e55b9f9c8b641fc49313d74d592813f5dd.tar.bz2
pttbbs-2b6b20e55b9f9c8b641fc49313d74d592813f5dd.tar.lz
pttbbs-2b6b20e55b9f9c8b641fc49313d74d592813f5dd.tar.xz
pttbbs-2b6b20e55b9f9c8b641fc49313d74d592813f5dd.tar.zst
pttbbs-2b6b20e55b9f9c8b641fc49313d74d592813f5dd.zip
use open/read instead cat
git-svn-id: http://opensvn.csie.org/pttbbs/pttbbs/trunk/pttbbs@1016 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
-rw-r--r--util/BBSFileHeader.pm5
1 files changed, 4 insertions, 1 deletions
diff --git a/util/BBSFileHeader.pm b/util/BBSFileHeader.pm
index e9cf3cdd..f203f57c 100644
--- a/util/BBSFileHeader.pm
+++ b/util/BBSFileHeader.pm
@@ -41,7 +41,10 @@ sub FETCH
}
elsif( $key eq 'content' ){
my $fn = "$self->{dir}/" . $self->FETCH("$num.filename");
- return `/bin/cat $fn`;
+ my($c, $fh);
+ open $fh, "<$fn" || return '';
+ $fh->read($c, (-s $fn));
+ return $c;
}
else{
($h{filename}, $h{recommend}, $h{owner}, $h{date}, $h{title},