diff --git a/administrator/components/com_patchtester/src/Model/PullModel.php b/administrator/components/com_patchtester/src/Model/PullModel.php index 1965ff63..f5fe51be 100644 --- a/administrator/components/com_patchtester/src/Model/PullModel.php +++ b/administrator/components/com_patchtester/src/Model/PullModel.php @@ -783,17 +783,18 @@ private function parseFileList(array $files): array $filePath = explode('/', $prodFileName); // Remove the `src` here to match the CMS paths if needed if ($filePath[0] === 'src') { - $prodFileName = str_replace('src/', '', $prodFileName); + $prodFileName = preg_replace('/^src\\//', '', $prodFileName, 1); } if ($prodRenamedFileName) { $filePath = explode('/', $prodRenamedFileName); // Remove the `src` here to match the CMS paths if needed if ($filePath[0] === 'src') { - $prodRenamedFileName = str_replace( - 'src/', + $prodRenamedFileName = preg_replace( + '/^src\\//', '', - $prodRenamedFileName + $prodRenamedFileName, + 1 ); } } diff --git a/administrator/components/com_patchtester/tmpl/pulls/default_items.php b/administrator/components/com_patchtester/tmpl/pulls/default_items.php index 07e469ef..bb45e04c 100644 --- a/administrator/components/com_patchtester/tmpl/pulls/default_items.php +++ b/administrator/components/com_patchtester/tmpl/pulls/default_items.php @@ -137,27 +137,27 @@ endif; ?>