diff options
author | in2 <in2@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2003-07-04 11:23:19 +0800 |
---|---|---|
committer | in2 <in2@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2003-07-04 11:23:19 +0800 |
commit | 2b6b20e55b9f9c8b641fc49313d74d592813f5dd (patch) | |
tree | 7f94acdff0b07202bb94e31cb77f8ddb7e7f5a9f /util | |
parent | 07ba1ee3d555817b56dcfc35618d170ff2359277 (diff) | |
download | pttbbs-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
Diffstat (limited to 'util')
-rw-r--r-- | util/BBSFileHeader.pm | 5 |
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}, |