mirror of
https://github.com/lrsjng/h5ai.git
synced 2025-05-24 12:07:10 -04:00
Fix fseek filesize.
This commit is contained in:
parent
efc4623a0b
commit
570431e39c
1 changed files with 3 additions and 2 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue