瀏覽代碼

Make error message a bit more useful

simond 23 年之前
父節點
當前提交
dfefd9c031
共有 1 個文件被更改,包括 3 次插入0 次删除
  1. 3 0
      functions/file_prefs.php

+ 3 - 0
functions/file_prefs.php

@@ -166,6 +166,9 @@ function checkForPrefs($data_dir, $username, $filename = '') {
         } else if (!@copy($default_pref, $filename)) {
             echo _("Error opening ") . $default_pref . '<br>';
             echo _("Could not create initial preference file!") . "<br>\n";
+            $user_data = posix_getpwuid(posix_getuid());
+            $uid = $user_data['name'];
+            echo $data_dir . ' ' . _("should be writable by user") . ' ' . $uid . "<br>\n";
             echo _("Please contact your system administrator and report this error.") . "<br>\n";
             exit;
         }