]> git.tue.mpg.de Git - adu.git/commit
Transform the database_dir/database_root arg into an absolute path.
authorAndre Noll <maan@systemlinux.org>
Fri, 21 Aug 2009 11:25:04 +0000 (13:25 +0200)
committerAndre Noll <maan@systemlinux.org>
Fri, 21 Aug 2009 11:25:04 +0000 (13:25 +0200)
commit1136bdfc82272850474eacba37cf87d01f6a1b7f
treef9e40b9e913e128c68be374cb2b89f904082bcfd
parent5a0a4bf7efefacd4cedbae61c10710af5339cc75
Transform the database_dir/database_root arg into an absolute path.

adu --create failed badly if called with --database_dir or
--database_root being relative path. This patch fixes the bug.

Unfortunately, it's not completely trivial to obtain the cwd
in a portable and secure manner. The method used in the
new absolute_path() function, while still not bullet-proof, is
the best what one can do if portability is an issue.
adu.c
string.c
string.h