mirror of
https://github.com/sbrl/Pepperminty-Wiki.git
synced 2024-11-22 16:33:00 +00:00
Bugfix: check whether file is directory unpon pageindex recreation. Fixes #42.
This commit is contained in:
parent
8924c7b9ac
commit
29399a379c
1 changed files with 2 additions and 1 deletions
3
core.php
3
core.php
|
@ -374,7 +374,8 @@ if(!file_exists($paths->pageindex))
|
||||||
// Extract the name of the (sub)page without the ".md"
|
// Extract the name of the (sub)page without the ".md"
|
||||||
$pagekey = utf8_encode(substr($newentry->filename, 0, -3));
|
$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!
|
// This page (potentially) has an associated file!
|
||||||
// Let's investigate.
|
// Let's investigate.
|
||||||
|
|
Loading…
Reference in a new issue