Don't prepend the directory specified by -d when the file is a relative

path.  Doing so makes no sense.  I'm not sure allowing relative paths
makes sense either, but I'm not going to break that now.
This commit is contained in:
Brooks Davis 2004-10-05 22:16:31 +00:00
parent f8135176c9
commit 59fdf30f92
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=136174

View File

@ -340,7 +340,7 @@ init_entry(const char *fname, struct conf_entry *src_entry)
if (tempwork == NULL)
err(1, "malloc of conf_entry for %s", fname);
if (destdir == NULL)
if (destdir == NULL || fname[0] != '/')
tempwork->log = strdup(fname);
else
asprintf(&tempwork->log, "%s%s", destdir, fname);