From 717d0dc1592361101ef5a8bd7e366cff3121046e Mon Sep 17 00:00:00 2001 From: Michael Wallner Date: Tue, 19 Jan 2016 08:59:07 +0100 Subject: [PATCH] fix repos containing supplementary .md files --- mdref/Tree.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/mdref/Tree.php b/mdref/Tree.php index dd27d6f..8f6c773 100644 --- a/mdref/Tree.php +++ b/mdref/Tree.php @@ -26,7 +26,9 @@ class Tree implements \RecursiveIterator { * @param \mdref\Repo $repo */ public function __construct($path, Repo $repo) { - if (!($list = glob("$path/*.md"))) { + if (realpath($path)."/" === $repo->getPath()) { + $list = [$path ."/". $repo->getName() .".md"]; + } elseif (!($list = glob("$path/*.md"))) { $list = glob("$path/*/*.md"); } if ($list) { -- 2.30.2