Skip to content

Commit 420d7c4

Browse files
committed
Add check for sub-folder resources.
1 parent 50515c3 commit 420d7c4

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

src/Server.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -838,6 +838,14 @@ private function parseLinkedMetadata(string $path)
838838
$rdfPaths = array_keys($toRdfPhp);
839839
$foundPath = $this->findPath($rdfPaths, $path);
840840

841+
// If the requested path is a sub folder or file, it also needs te be handled
842+
foreach ($rdfPaths as $rdfPath) {
843+
if (strpos($rdfPath, $path) !== false) {
844+
$foundPath = $rdfPath;
845+
break;
846+
}
847+
}
848+
841849
if (isset($toRdfPhp[$foundPath])) {
842850
$filteredRdfData = array_filter($toRdfPhp[$foundPath], static function ($key) {
843851
$uris = implode('|', [

0 commit comments

Comments
 (0)