create data directory if it doesn't exist

This commit is contained in:
Robin 2010-04-21 00:25:34 +02:00
parent 947c569779
commit 643e3726b4
1 changed files with 7 additions and 0 deletions

View File

@ -62,6 +62,13 @@ class OC_CONFIG{
$_POST['dbpassword']=$CONFIG_DBPASSWORD;
}
}
if(!is_dir($_POST['datadirectory'])){
try{
mkdir($_POST['datadirectory']);
}catch(Exception $e){
$error.='error while trying to create data directory<br/>';
}
}
if(empty($error)) {
//create/fill database
$CONFIG_DBTYPE=$dbtype;