From a9fdba638f75e49badac271fd6a2bf0c367257c7 Mon Sep 17 00:00:00 2001 From: Michael Vogel Date: Sat, 19 Sep 2015 11:30:19 +0200 Subject: [PATCH] Avoiding errors when checking for the lockpath --- boot.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/boot.php b/boot.php index 7451891fef..e2eed38ebf 100644 --- a/boot.php +++ b/boot.php @@ -1811,7 +1811,11 @@ function get_lockpath() { if ($temppath != "") { $lockpath = $temppath."/lock"; - mkdir($lockpath); + + if (!is_dir($lockpath)) + mkdir($lockpath); + elseif (!is_writable($lockpath)) + $lockpath = $temppath; if (is_dir($lockpath) AND is_writable($lockpath)) { set_config("system", "lockpath", $lockpath);