Skip to content

Commit 0dc03fe

Browse files
authored
Merge pull request #738 from lusitdev/fix-url-path-separators-on-windows
Fix: Mixed path delimiters on Windows (Fixes #737)
2 parents cee4c78 + 0aa9c57 commit 0dc03fe

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/SiteBuilder.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,8 +140,8 @@ private function getMetaData($file, $baseUrl)
140140
{
141141
$filename = $file->getFilenameWithoutExtension();
142142
$extension = $file->getFullExtension();
143-
$path = rightTrimPath($this->outputPathResolver->link($file->getRelativePath(), $filename, $file->getExtraBladeExtension() ?: 'html'));
144-
$relativePath = $file->getRelativePath();
143+
$relativePath = str_replace('\\', '/', $file->getRelativePath());
144+
$path = rightTrimPath($this->outputPathResolver->link($relativePath, $filename, $file->getExtraBladeExtension() ?: 'html'));
145145
$url = rightTrimPath($baseUrl) . '/' . trimPath($path);
146146
$modifiedTime = $file->getLastModifiedTime();
147147

0 commit comments

Comments
 (0)