NEW Allow files to have a .tmpl extension which is stripped

This commit is contained in:
Daniel Hensby 2018-02-22 19:07:20 +00:00
parent 3e16a5b138
commit 0d4b4cf0e5
No known key found for this signature in database
GPG Key ID: B00D1E9767F0B06E
1 changed files with 4 additions and 0 deletions

View File

@ -44,6 +44,10 @@ class RecipeInstaller extends LibraryInstaller {
$any = false;
foreach($fileIterator as $path => $info) {
$destination = $destinationRoot . substr($path, strlen($sourceRoot));
$extension = pathinfo($destination, PATHINFO_EXTENSION);
if ($extension === 'tmpl') {
$destination = substr($destination, -5);
}
$relativePath = substr($path, strlen($sourceRoot) + 1); // Name path without leading '/'
// Write header