If we are given a zero byte file, we SKIP it
All checks were successful
Create Docker Image / Build Docker Image (x86_64) (push) Successful in 43s
Create Docker Image / Build Docker Image (arm64) (push) Successful in 1m49s
Create Docker Image / Final Docker Image Manifest (push) Successful in 10s

This commit is contained in:
Deon George 2024-09-30 08:53:31 +10:00
parent 43c573f641
commit bc12a2b741

View File

@ -663,7 +663,7 @@ final class Binkp extends BaseProtocol
$offs = (int)$this->strsep($str,' ');
$flags = $this->strsep($str,' ');
if ($name && $size && $time) {
if ($name && is_numeric($size) && $time) {
return [
'file'=>['name'=>$name,'size'=>$size,'mtime'=>$time],
'offs'=>$offs,
@ -918,6 +918,18 @@ final class Binkp extends BaseProtocol
$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 {
switch ($this->recv->open($file['offs']<0,$file['flags'])) {
case self::FOP_ERROR: