From: Michael Wallner Date: Tue, 19 Jan 2016 07:59:07 +0000 (+0100) Subject: fix repos containing supplementary .md files X-Git-Url: https://git.m6w6.name/?a=commitdiff_plain;h=717d0dc1592361101ef5a8bd7e366cff3121046e;p=mdref%2Fmdref fix repos containing supplementary .md files --- 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) {