From df5cc8c2d4c2f868289eb049d0c7663eeb03d087 Mon Sep 17 00:00:00 2001 From: Deon George Date: Fri, 6 Oct 2023 14:59:14 +1100 Subject: [PATCH] TIC processing fixes, was unable to find TIC file --- app/Classes/FTN/Tic.php | 3 +-- app/Jobs/TicProcess.php | 6 +++--- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/app/Classes/FTN/Tic.php b/app/Classes/FTN/Tic.php index 80d7f98..ff8f7e2 100644 --- a/app/Classes/FTN/Tic.php +++ b/app/Classes/FTN/Tic.php @@ -145,7 +145,6 @@ class Tic extends FTNBase /** * Load a TIC file from an existing filename * - * @param string $sp * @param string $filename Relative to filesystem * @return void * @throws FileNotFoundException @@ -164,7 +163,7 @@ class Tic extends FTNBase } if (! $fs->exists($filename)) - throw new FileNotFoundException(sprintf('File [%s] doesnt exist',$filename)); + throw new FileNotFoundException(sprintf('File [%s] doesnt exist',$fs->path($filename))); if (! is_readable($fs->path($filename))) throw new UnableToReadFile(sprintf('File [%s] is not readable',realpath($filename))); diff --git a/app/Jobs/TicProcess.php b/app/Jobs/TicProcess.php index c9a653c..e17dacf 100644 --- a/app/Jobs/TicProcess.php +++ b/app/Jobs/TicProcess.php @@ -62,10 +62,10 @@ class TicProcess implements ShouldQueue $to = new Tic; try { - $to->load($fs->path($rel_name)); + $to->load($rel_name); } catch (\Exception $e) { - Log::error(sprintf('%s:! Error loading TIC file [%s]',self::LOGKEY,$rel_name)); + Log::error(sprintf('%s:! Error loading TIC file [%s] (%s)',self::LOGKEY,$rel_name,$e->getMessage())); return; } @@ -77,7 +77,7 @@ class TicProcess implements ShouldQueue try { if ($fs->makeDirectory($dir)) { - $fs->move($rel_name,$x=sprintf('%s/%s/%s',config('fido.dir'),$dir,$this->file)); + $fs->move($rel_name,$x=sprintf('%s/%s',$dir,$this->file)); Log::info(sprintf('%s:- Moved processed TIC [%s] to [%s]',self::LOGKEY,$rel_name,$x)); } else