瀏覽代碼

Fix #34, now showing an error message

Maurice Meyer 8 年之前
父節點
當前提交
4c4269c1fa
共有 1 個文件被更改,包括 7 次插入0 次删除
  1. 7 0
      api/install.php

+ 7 - 0
api/install.php

@@ -18,6 +18,13 @@ if(file_exists("../config/config-user.php")) {
     echo "Permission denied!";
     exit();
 }
+
+if(!(is_writable("../config"))) {
+    $retval['status'] = "error";
+    $retval['message'] = "Can't write to the config directory, please check the file system permissions";
+    die(json_encode($retval));
+}
+
 //Get input
 $input = json_decode(file_get_contents('php://input'));
 //Database command