Fix for bug introduced in previous commit, where tic files where queued without the address prefix

This commit is contained in:
2023-09-05 20:41:41 +12:00
parent 3cd0deada0
commit 63a9c06fb0
5 changed files with 15 additions and 8 deletions

View File

@@ -133,11 +133,15 @@ class Tic extends FTNBase
{
Log::info(sprintf('%s:Processing TIC file [%s]',self::LOGKEY,$filename));
list($hex,$name) = explode('-',$filename);
$hex = basename($hex);
if (str_contains($filename,'-')) {
list($hex,$name) = explode('-',$filename);
$hex = basename($hex);
} else {
$hex = '';
}
if (! file_exists($filename))
throw new FileNotFoundException(sprintf('%s:File [%s] doesnt exist',self::LOGKEY,realpath($filename)));
throw new FileNotFoundException(sprintf('%s:File [%s] doesnt exist',self::LOGKEY,$filename));
if (! is_readable($filename))
throw new UnableToWriteFile(sprintf('%s:File [%s] is not readable',self::LOGKEY,realpath($filename)));