Use regex for received file evaluation. Fixes recording received packet names

This commit is contained in:
2023-11-23 23:17:13 +11:00
parent 455fed52ee
commit 0800c48928
5 changed files with 14 additions and 10 deletions

View File

@@ -182,10 +182,10 @@ class Tic extends FTNBase
$this->file->recv_tic = preg_replace('/\.[Tt][Ii][Cc]$/','',$filename);
$m = [];
if (preg_match('/^(([0-9A-F]{4})-)?(([0-9]{4,10})-)?(.*).[Tt][Ii][Cc]$/',$filename,$m)) {
$aid = $m[2];
$mtime = $m[4];
$this->file->recv_tic = $m[5];
if (preg_match(sprintf('/^%s\.[Tt][Ii][Cc]$/',Packet::regex),$filename,$m)) {
$aid = $m[1];
$mtime = $m[2];
$this->file->recv_tic = $m[3];
}
$ldesc = '';