1
0
Fork 0
mirror of https://github.com/sbrl/Pepperminty-Wiki.git synced 2024-11-22 04:23:01 +00:00

Bugfix: check whether file is directory unpon pageindex recreation. Fixes #42.

This commit is contained in:
Starbeamrainbowlabs 2015-12-05 18:34:50 +00:00
parent 8924c7b9ac
commit 29399a379c

View file

@ -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.