1
0
mirror of https://github.com/danog/tgseclib.git synced 2024-11-27 04:34:45 +01:00

Explicitly set size to 0 when creating or truncating.

This commit is contained in:
Andreas Fischer 2015-06-25 14:26:35 +02:00
parent 9e07fb704b
commit d71da6b02b

View File

@ -282,6 +282,7 @@ class Net_SFTP_Stream
return false;
} else {
$this->sftp->touch($path);
$this->size = 0;
}
} else {
switch ($this->mode[0]) {
@ -289,6 +290,7 @@ class Net_SFTP_Stream
return false;
case 'w':
$this->sftp->truncate($path, 0);
$this->size = 0;
}
}