mirror of
https://github.com/phpseclib/phpseclib.git
synced 2024-11-16 10:15:14 +00:00
Merge branch 'master' into php5
* master: SFTP: Use hexdec() and bin2hex() for filesize calculation.
This commit is contained in:
commit
8af52e2954
@ -2479,9 +2479,7 @@ class Net_SFTP extends Net_SSH2
|
|||||||
// IEEE 754 binary64 "double precision" on such platforms and
|
// IEEE 754 binary64 "double precision" on such platforms and
|
||||||
// as such can represent integers of at least 2^50 without loss
|
// as such can represent integers of at least 2^50 without loss
|
||||||
// of precision. Interpreted in filesize, 2^50 bytes = 1024 TiB.
|
// of precision. Interpreted in filesize, 2^50 bytes = 1024 TiB.
|
||||||
extract(unpack('Nupper/Nsize', $this->_string_shift($response, 8)));
|
$attr['size'] = hexdec(bin2hex($this->_string_shift($response, 8)));
|
||||||
$attr['size'] = $upper ? 4294967296 * $upper : 0;
|
|
||||||
$attr['size']+= $size < 0 ? ($size & 0x7FFFFFFF) + 0x80000000 : $size;
|
|
||||||
break;
|
break;
|
||||||
case NET_SFTP_ATTR_UIDGID: // 0x00000002 (SFTPv3 only)
|
case NET_SFTP_ATTR_UIDGID: // 0x00000002 (SFTPv3 only)
|
||||||
$attr+= unpack('Nuid/Ngid', $this->_string_shift($response, 8));
|
$attr+= unpack('Nuid/Ngid', $this->_string_shift($response, 8));
|
||||||
|
Loading…
Reference in New Issue
Block a user