Skip to content

Commit

Permalink
Fix an issue that preventing the use of "extends:" to define the inhe…
Browse files Browse the repository at this point in the history
…ritance tree on Windows (#1056)
  • Loading branch information
matsuo committed Aug 28, 2024
1 parent fd90f7e commit 30c6ee6
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/Resource/ExtendsPlugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,11 @@ public function getContent(Source $source)
*/
public function getBasename(Source $source)
{
return str_replace(':', '.', basename($source->getResourceName()));
$search = array(':');
if (\Smarty\Smarty::$_IS_WINDOWS) {
$search = array(':', '|');
}
return str_replace($search, '.', basename($source->getResourceName()));
}

/*
Expand Down

0 comments on commit 30c6ee6

Please sign in to comment.