From 643e3726b4b728e2acdde9ce54b730e17ad4afd0 Mon Sep 17 00:00:00 2001
From: Robin <robin@Amaya.(none)>
Date: Wed, 21 Apr 2010 00:25:34 +0200
Subject: [PATCH] create data directory if it doesn't exist

---
 inc/lib_config.php | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/inc/lib_config.php b/inc/lib_config.php
index a3270ab41b..1c6ba09fbd 100755
--- a/inc/lib_config.php
+++ b/inc/lib_config.php
@@ -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;
-- 
GitLab