aboutsummaryrefslogtreecommitdiff
path: root/usr.sbin/newsyslog/newsyslog.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr.sbin/newsyslog/newsyslog.c')
-rw-r--r--usr.sbin/newsyslog/newsyslog.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/usr.sbin/newsyslog/newsyslog.c b/usr.sbin/newsyslog/newsyslog.c
index 590dbf66f00f..632cc6ae308e 100644
--- a/usr.sbin/newsyslog/newsyslog.c
+++ b/usr.sbin/newsyslog/newsyslog.c
@@ -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);