33
2
mirror of https://github.com/joomla-extensions/jedchecker.git synced 2025-01-30 08:58:23 +00:00

don't warn on missed unzipped files (in packages)

This commit is contained in:
Denis Ryabov 2021-02-18 15:20:00 +03:00
parent a1197006e5
commit 5bab76e834

View File

@ -202,10 +202,17 @@ class JedcheckerRulesXMLFiles extends JEDcheckerRule
{
foreach ($files as $file)
{
if (!is_file($dir . $file))
$filename = $dir . $file;
if (is_file($filename))
{
$this->errors[] = JText::sprintf('COM_JEDCHECKER_XML_FILES_FILE_NOT_FOUND', (string)$file);
continue;
}
// extra check for unzipped files
if (preg_match('/^(.*)\.(zip|tar\.gz)$/', $filename, $matches) && is_dir($matches[1]))
{
continue;
}
$this->errors[] = JText::sprintf('COM_JEDCHECKER_XML_FILES_FILE_NOT_FOUND', (string)$file);
}
}