mirror of
https://github.com/phpseclib/phpseclib.git
synced 2025-01-14 18:59:51 +00:00
And here too, size-related logic problems
This commit is contained in:
parent
e24d7612a2
commit
b47109cf55
@ -262,7 +262,7 @@ class Net_SFTP_Stream {
|
||||
}
|
||||
}
|
||||
|
||||
$this->pos = $this->mode[0] != 'a' ? 0 : $size;
|
||||
$this->pos = $this->mode[0] != 'a' ? 0 : $this->size;
|
||||
|
||||
return true;
|
||||
}
|
||||
@ -297,7 +297,7 @@ class Net_SFTP_Stream {
|
||||
return 0;
|
||||
}
|
||||
// seems that PHP calls stream_read in 8k chunks
|
||||
call_user_func($this->notification, STREAM_NOTIFY_PROGRESS, STREAM_NOTIFY_SEVERITY_INFO, '', 0, strlen($result), $size);
|
||||
call_user_func($this->notification, STREAM_NOTIFY_PROGRESS, STREAM_NOTIFY_SEVERITY_INFO, '', 0, strlen($result), $this->size);
|
||||
}
|
||||
|
||||
if (empty($result)) { // ie. false or empty string
|
||||
@ -756,4 +756,4 @@ class Net_SFTP_Stream {
|
||||
}
|
||||
}
|
||||
|
||||
stream_wrapper_register('sftp', 'Net_SFTP_Stream');
|
||||
stream_wrapper_register('sftp', 'Net_SFTP_Stream');
|
||||
|
Loading…
Reference in New Issue
Block a user