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:
parent
9e07fb704b
commit
d71da6b02b
@ -282,6 +282,7 @@ class Net_SFTP_Stream
|
|||||||
return false;
|
return false;
|
||||||
} else {
|
} else {
|
||||||
$this->sftp->touch($path);
|
$this->sftp->touch($path);
|
||||||
|
$this->size = 0;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
switch ($this->mode[0]) {
|
switch ($this->mode[0]) {
|
||||||
@ -289,6 +290,7 @@ class Net_SFTP_Stream
|
|||||||
return false;
|
return false;
|
||||||
case 'w':
|
case 'w':
|
||||||
$this->sftp->truncate($path, 0);
|
$this->sftp->truncate($path, 0);
|
||||||
|
$this->size = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user