Skip to content
Snippets Groups Projects
Commit 6b9c156c authored by Anika Henke's avatar Anika Henke
Browse files

improved error message for savedir paths (FS#2502)

parent db53782e
No related branches found
No related tags found
No related merge requests found
......@@ -234,9 +234,12 @@ function init_paths(){
'tmpdir' => 'tmp');
foreach($paths as $c => $p){
if(empty($conf[$c])) $conf[$c] = $conf['savedir'].'/'.$p;
$conf[$c] = init_path($conf[$c]);
if(empty($conf[$c])) nice_die("The $c ('$p') does not exist, isn't accessible or writable.
$path = $conf[$c];
if(empty($path))
$path = $conf['savedir'].'/'.$p;
$conf[$c] = init_path($path);
if(empty($conf[$c]))
nice_die("The $c ('$p') at $path is not found, isn't accessible or writable.
You should check your config and permission settings.
Or maybe you want to <a href=\"install.php\">run the
installer</a>?");
......@@ -265,7 +268,7 @@ function init_lang($langCode) {
}
/**
* Checks the existance of certain files and creates them if missing.
* Checks the existence of certain files and creates them if missing.
*/
function init_files(){
global $conf;
......@@ -312,7 +315,7 @@ function init_files(){
* @author Andreas Gohr <andi@splitbrain.org>
*/
function init_path($path){
// check existance
// check existence
$p = fullpath($path);
if(!@file_exists($p)){
$p = fullpath(DOKU_INC.$path);
......@@ -560,7 +563,7 @@ function fullpath($path,$exists=false){
}
$finalpath = $root.implode('/', $newpath);
// check for existance when needed (except when unit testing)
// check for existence when needed (except when unit testing)
if($exists && !defined('DOKU_UNITTEST') && !@file_exists($finalpath)) {
return false;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment