Fixed issues with EEPROM file extensions.

This commit is contained in:
flash 2025-01-17 00:44:01 +00:00
parent 55918d5cab
commit a8359af2e3

View file

@ -61,7 +61,9 @@ final class EEPROMLookup implements \Uiharu\ILookup {
if(!isset($fileId))
throw new RuntimeException('Was unable to find EEPROM file id.');
if(!preg_match('#^([A-Za-z0-9-_]+)$#', $fileId))
$fileId = pathinfo($fileId, PATHINFO_FILENAME);
if(!is_string($fileId) || !preg_match('#^([A-Za-z0-9-_]+)$#', $fileId))
throw new RuntimeException('Invalid EEPROM file id format.');
$fileInfo = $this->rawLookup($fileId);