From 29399a379c89d8fb54b00ee465bc8b64b6a8c9df Mon Sep 17 00:00:00 2001 From: Starbeamrainbowlabs Date: Sat, 5 Dec 2015 18:34:50 +0000 Subject: [PATCH] Bugfix: check whether file is directory unpon pageindex recreation. Fixes #42. --- core.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core.php b/core.php index a4654ce..7818d17 100644 --- a/core.php +++ b/core.php @@ -374,7 +374,8 @@ if(!file_exists($paths->pageindex)) // Extract the name of the (sub)page without the ".md" $pagekey = utf8_encode(substr($newentry->filename, 0, -3)); - if(file_exists($env->storage_prefix . $pagekey)) + if(file_exists($env->storage_prefix . $pagekey) && // If it exists... + !is_dir($env->storage_prefix . $pagekey)) // ...and isn't a directory { // This page (potentially) has an associated file! // Let's investigate.