Skip to content

Commit 086e891

Browse files
author
Bryan Mills
committed
Fix error on pattern path resolution in Windows caused by mixed directory separators.
For a description of the problem: pattern-lab/edition-php-twig-standard#6
1 parent b3d7e09 commit 086e891

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/PatternLab/PatternData.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,8 +128,8 @@ public static function gather($options = array()) {
128128
$isDir = $object->isDir();
129129
$isFile = $object->isFile();
130130

131-
$path = str_replace($patternSourceDir."/","",$object->getPath());
132-
$pathName = str_replace($patternSourceDir."/","",$object->getPathname());
131+
$path = str_replace($patternSourceDir.DIRECTORY_SEPARATOR,"",$object->getPath());
132+
$pathName = str_replace($patternSourceDir.DIRECTORY_SEPARATOR,"",$object->getPathname());
133133
$name = $object->getFilename();
134134
$depth = substr_count($pathName,DIRECTORY_SEPARATOR);
135135

0 commit comments

Comments
 (0)