]> git.tuebingen.mpg.de Git - adu.git/blobdiff - adu.c
Merge branch 'refs/heads/t/doc-improvements'
[adu.git] / adu.c
diff --git a/adu.c b/adu.c
index 7d133d619836e3340e5bce2f6b2b3bf83b39d789..fe0caa501a2ce35e5f83273af8dace42f420bde4 100644 (file)
--- a/adu.c
+++ b/adu.c
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2008 Andre Noll <maan@systemlinux.org>
+ * Copyright (C) 2008 Andre Noll <maan@tuebingen.mpg.de>
  *
  * Licensed under the GPL v2. For licencing details see COPYING.
  */
@@ -296,9 +296,15 @@ static void get_database_dir_or_die(void)
 
        if (conf.database_dir_given)
                tmp = adu_strdup(conf.database_dir_arg);
-       else
+       else {
+               if (!conf.base_dir_arg) {
+                       EMERG_LOG("fatal: neither database dir "
+                               "nor base dir given\n");
+                       exit(EXIT_FAILURE);
+               }
                tmp = make_message("%s%s",
                        conf.database_root_arg, conf.base_dir_arg);
+       }
        /*
         * As we change the cwd during database creation, database_dir
         * must be an absolute path.