From: Michael Vogel Date: Sat, 19 Sep 2015 09:30:19 +0000 (+0200) Subject: Avoiding errors when checking for the lockpath X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=a9fdba638f75e49badac271fd6a2bf0c367257c7;p=friendica.git Avoiding errors when checking for the lockpath --- 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);