]> git.mxchange.org Git - friendica.git/commitdiff
Merge pull request #1893 from annando/1509-lockpath
authorTobias Diekershoff <tobias.diekershoff@gmx.net>
Sat, 19 Sep 2015 11:53:13 +0000 (13:53 +0200)
committerTobias Diekershoff <tobias.diekershoff@gmx.net>
Sat, 19 Sep 2015 11:53:13 +0000 (13:53 +0200)
Avoiding errors when checking for the lockpath

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);