If we are given a zero byte file, we SKIP it
This commit is contained in:
parent
43c573f641
commit
bc12a2b741
@ -663,7 +663,7 @@ final class Binkp extends BaseProtocol
|
|||||||
$offs = (int)$this->strsep($str,' ');
|
$offs = (int)$this->strsep($str,' ');
|
||||||
$flags = $this->strsep($str,' ');
|
$flags = $this->strsep($str,' ');
|
||||||
|
|
||||||
if ($name && $size && $time) {
|
if ($name && is_numeric($size) && $time) {
|
||||||
return [
|
return [
|
||||||
'file'=>['name'=>$name,'size'=>$size,'mtime'=>$time],
|
'file'=>['name'=>$name,'size'=>$size,'mtime'=>$time],
|
||||||
'offs'=>$offs,
|
'offs'=>$offs,
|
||||||
@ -918,6 +918,18 @@ final class Binkp extends BaseProtocol
|
|||||||
|
|
||||||
$this->recv->new($file['file'],$this->node->address,$this->force_queue);
|
$this->recv->new($file['file'],$this->node->address,$this->force_queue);
|
||||||
|
|
||||||
|
// If the file is zero byte size, we'll skip it
|
||||||
|
if ($this->recv->recvsize === 0) {
|
||||||
|
Log::error(sprintf('%s:! SKIPPING zero byte file info [%s]',self::LOGKEY,$this->recv->nameas));
|
||||||
|
|
||||||
|
$this->msgs(self::BPM_SKIP,$this->recv->name_size_time);
|
||||||
|
|
||||||
|
// Close the file, since we are skipping it.
|
||||||
|
$this->recv->close();
|
||||||
|
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
switch ($this->recv->open($file['offs']<0,$file['flags'])) {
|
switch ($this->recv->open($file['offs']<0,$file['flags'])) {
|
||||||
case self::FOP_ERROR:
|
case self::FOP_ERROR:
|
||||||
|
Loading…
Reference in New Issue
Block a user