]> git.mxchange.org Git - friendica.git/commitdiff
Avoiding errors when checking for the lockpath
authorMichael Vogel <icarus@dabo.de>
Sat, 19 Sep 2015 09:30:19 +0000 (11:30 +0200)
committerMichael Vogel <icarus@dabo.de>
Sat, 19 Sep 2015 09:30:19 +0000 (11:30 +0200)
boot.php

index 7451891fef1805571301f14ab27d3749f240455e..e2eed38ebfd41f72f85d26fedfd9b9c9f44027ba 100644 (file)
--- 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);