mirror of
https://github.com/lrsjng/h5ai.git
synced 2025-08-10 07:54:00 +02:00
Fix fseek filesize.
This commit is contained in:
@@ -17,8 +17,9 @@ class Filesize {
|
||||
fseek($handle, 0, SEEK_SET);
|
||||
|
||||
while ($step > 1) {
|
||||
if (fseek($handle, $step, SEEK_CUR) === 0) {
|
||||
$size += $step;
|
||||
fseek($handle, $step, SEEK_CUR);
|
||||
if (fgetc($handle) !== false) {
|
||||
$size += $step + 1;
|
||||
} else {
|
||||
fseek($handle, -$step, SEEK_CUR);
|
||||
$step = intval($step / 2, 10);
|
||||
|
Reference in New Issue
Block a user