]> git.tuebingen.mpg.de Git - adu.git/commit
Abort if neither --database-dir nor --base-dir is given.
authorAndre Noll <maan@tuebingen.mpg.de>
Thu, 2 Jun 2016 15:37:26 +0000 (17:37 +0200)
committerAndre Noll <maan@tuebingen.mpg.de>
Fri, 24 Jun 2016 10:59:36 +0000 (12:59 +0200)
commita830359f7afc8e98a2266ea023061efd6ad081a5
tree268076dd27a88c6454a9c0c542a3eba1e0d657fd
parent2c6a364ea289f39581d1915df6c0bfa01f98b5c1
Abort if neither --database-dir nor --base-dir is given.

If --database-dir is not given, adu concatenates the database root
directory (which defaults to /var/lib/adu) with the value of the
--base-dir argument. However, if --base-dir is not given either,
base_dir_arg is NULL, and the concatenated string becomes the result
is /var/lib/adu(null), at least on glibc.

With this patch applied, adu handles this case more gracefully: it
prints an error message and aborts early.
adu.c