mirror of
https://github.com/danog/tgseclib.git
synced 2025-01-21 21:41:14 +01:00
SFTP: Make get() work correctly when files are being written to for partial transfers
This commit is contained in:
parent
35832fe2a1
commit
885d7e0f24
@ -1556,7 +1556,11 @@ class Net_SFTP extends Net_SSH2 {
|
||||
}
|
||||
|
||||
if ($length > 0 && $length <= $offset - $size) {
|
||||
$content = substr($content, 0, $length);
|
||||
if ($local_file === false) {
|
||||
$content = substr($content, 0, $length);
|
||||
} else {
|
||||
ftruncate($fp, $length);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user