Process TIC files even if they omit the size attribute
This commit is contained in:
parent
2316663dac
commit
dacd8be4c2
@ -135,7 +135,7 @@ class Tic extends FTNBase
|
||||
*/
|
||||
public function isNodelist(): bool
|
||||
{
|
||||
Log::critical(sprintf('%s:D fo_nodelist_file_area [%d], fo_filearea_domain_filearea_id [%d], regex [%s] name [%s]',
|
||||
Log::info(sprintf('%s:D fo_nodelist_file_area [%d], fo_filearea_domain_filearea_id [%d], regex [%s] name [%s]',
|
||||
self::LOGKEY,
|
||||
$this->file->nodelist_filearea_id,
|
||||
$this->file->filearea->domain->filearea_id,
|
||||
@ -347,7 +347,7 @@ class Tic extends FTNBase
|
||||
// @todo Add notification back to the system if no replaces line and the file already exists
|
||||
|
||||
// Validate Size
|
||||
if ($this->file->size !== ($y=$fs->size($file)))
|
||||
if ((! is_null($this->file->size)) && ($this->file->size !== ($y=$fs->size($file))))
|
||||
throw new SizeMismatchException(sprintf('TIC file size [%d] doesnt match file [%s] (%d)',$this->file->size,$fs->path($rel_path_name),$y));
|
||||
|
||||
// Validate Password
|
||||
@ -367,6 +367,10 @@ class Tic extends FTNBase
|
||||
if (! $this->file->datetime)
|
||||
$this->file->datetime = Carbon::createFromTimestamp($fs->lastModified($file));
|
||||
|
||||
// If the file size was omitted, we'll use the file's size
|
||||
if (is_null($this->file->size))
|
||||
$this->file->size = $fs->size($file);
|
||||
|
||||
$this->file->src_file = $file;
|
||||
$this->file->recv_tic = $filename;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user