Better catch TIC file exceptions, enable moving TIC files if fido.packet_keep is defined

This commit is contained in:
2023-10-04 22:22:01 +11:00
parent ce7a96ca2a
commit b854cf9fe0
4 changed files with 39 additions and 11 deletions

View File

@@ -292,11 +292,11 @@ class Tic extends FTNBase
// Validate Size
if ($this->fo->size !== ($y=$fs->size($this->fo->recvd_rel_name)))
throw new \Exception(sprintf('TIC file size [%d] doesnt match file [%s] (%d)',$this->fo->size,$this->fo->fullname,$y));
throw new \Exception(sprintf('TIC file size [%d] doesnt match file [%s] (%d)',$this->fo->size,$this->fo->recvd_rel_name,$y));
// Validate CRC
if (sprintf('%08x',$this->fo->crc) !== ($y=$fs->checksum($this->fo->recvd_rel_name,['checksum_algo'=>'crc32b'])))
throw new \Exception(sprintf('TIC file CRC [%08x] doesnt match file [%s] (%s)',$this->fo->crc,$this->fo->fullname,$y));
throw new \Exception(sprintf('TIC file CRC [%08x] doesnt match file [%s] (%s)',$this->fo->crc,$this->fo->recvd_rel_name,$y));
// Validate Password
if ($pw !== ($y=$this->from->session('ticpass')))