summaryrefslogtreecommitdiffstats
path: root/config-db
diff options
context:
space:
mode:
authorOliver Tappe2006-10-28 20:23:39 +0200
committerOliver Tappe2006-10-28 20:23:39 +0200
commit5585ade1ed34b04090a438ea3cc3c9f3e9782dd7 (patch)
tree33069a7209117952028be4edade1882f998df765 /config-db
parent* added separate script for simple database setup (diff)
downloadcore-5585ade1ed34b04090a438ea3cc3c9f3e9782dd7.tar.gz
core-5585ade1ed34b04090a438ea3cc3c9f3e9782dd7.tar.xz
core-5585ade1ed34b04090a438ea3cc3c9f3e9782dd7.zip
* we now check if we could create the database folder and
bail in case we didn't succees, such that we no longer create db-files in the current directory in case of an error. git-svn-id: http://svn.openslx.org/svn/openslx/trunk@478 95ad53e4-c205-0410-b2fa-d234c58c8868
Diffstat (limited to 'config-db')
-rw-r--r--config-db/OpenSLX/MetaDB/CSV.pm6
1 files changed, 5 insertions, 1 deletions
diff --git a/config-db/OpenSLX/MetaDB/CSV.pm b/config-db/OpenSLX/MetaDB/CSV.pm
index 85be8285..d2e87309 100644
--- a/config-db/OpenSLX/MetaDB/CSV.pm
+++ b/config-db/OpenSLX/MetaDB/CSV.pm
@@ -48,7 +48,11 @@ sub connectConfigDB
my $dbDatadir = $openslxConfig{'db-datadir'}
|| "$openslxConfig{'db-name'}-csv";
my $dbPath = "$dbBasepath/$dbDatadir";
- mkdir $dbPath unless -e $dbPath;
+ if (!-e $dbPath) {
+ mkdir $dbPath
+ or die _tr("unable to create db-datadir %s! (%s)\n",
+ $dbPath, $!);
+ }
$dbSpec = "f_dir=$dbPath";
}
vlog 1, "trying to connect to CSV-database <$dbSpec>";