fix repos containing supplementary .md files
[mdref/mdref] / mdref / Entry.php
index 8c6673b7202e58668cf4afa559ac1d819160e0b1..db858a9c2d2a207ba694ed8b4a2518c427ff405d 100644 (file)
@@ -153,7 +153,11 @@ class Entry implements \IteratorAggregate {
         * @return \mdref\Entry
         */
        public function getParent() {
-               if ("." !== ($dirn = dirname($this->name))) {
+               switch ($dirn = dirname($this->name)) {
+               case ".":
+               case "/":
+                       break;
+               default:
                        return $this->repo->getEntry($dirn);
                }
        }