From 5585ade1ed34b04090a438ea3cc3c9f3e9782dd7 Mon Sep 17 00:00:00 2001 From: Oliver Tappe Date: Sat, 28 Oct 2006 18:23:39 +0000 Subject: * 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 --- config-db/OpenSLX/MetaDB/CSV.pm | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'config-db/OpenSLX/MetaDB') 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>"; -- cgit v1.2.3-55-g7522