Skip to content

Commit e93bb38

Browse files
committed
fix issues
1 parent e72b650 commit e93bb38

File tree

1 file changed

+7
-6
lines changed
  • administrator/components/com_patchtester/PatchTester/Model

1 file changed

+7
-6
lines changed

administrator/components/com_patchtester/PatchTester/Model/PullModel.php

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -94,19 +94,20 @@ protected function parseFileList($files)
9494
}
9595
}
9696

97-
// Remove the `src` here to match the CMS paths if needed
98-
$repofilename = $file->filename;
99-
$filePath = explode('/', $repofilename);
97+
// Sometimes the repo filename is not the production file name
98+
$prodfilename = $file->filename;
99+
$filePath = explode('/', $repofilename);
100100

101+
// Remove the `src` here to match the CMS paths if needed
101102
if ($filePath[0] === 'src')
102103
{
103-
$repofilename = str_replace('src/', '', $file->filename);
104+
$prodfilename = str_replace('src/', '', $file->filename);
104105
}
105106

106107
$parsedFiles[] = (object) array(
107108
'action' => $file->status,
108-
'filename' => $file->filename,
109-
'repofilename' => $repofilename,
109+
'filename' => $prodfilename,
110+
'repofilename' => $file->filename,
110111
'fileurl' => $file->contents_url,
111112
);
112113
}

0 commit comments

Comments
 (0)