Skip to content

Commit

Permalink
Fix relative path generation on windows
Browse files Browse the repository at this point in the history
  • Loading branch information
cebe committed May 24, 2021
1 parent 4257bc6 commit 8f1f706
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/spec/Reference.php
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,7 @@ private function adjustRelativeReferences($referencedDocument, $basePath, $baseD
private function makeRelativePath($base, $path)
{
if (strpos($path, dirname($base)) === 0) {
return '.' . DIRECTORY_SEPARATOR . substr($path, strlen(dirname($base) . DIRECTORY_SEPARATOR));
return './' . substr($path, strlen(dirname($base) . '/'));
}

return $path;
Expand Down

0 comments on commit 8f1f706

Please sign in to comment.