From 40a00e5adf899568fa3256e93bc2bf013a0a6483 Mon Sep 17 00:00:00 2001 From: Stefan Ritt Date: Thu, 16 Sep 2010 04:34:29 +0000 Subject: [PATCH] Add logbook dir to custom form SVN revision: 2325 --- src/elogd.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/elogd.c b/src/elogd.c index f263a68e..afc7af55 100755 --- a/src/elogd.c +++ b/src/elogd.c @@ -9196,6 +9196,13 @@ void show_edit_form(LOGBOOK * lbs, int message_id, BOOL breply, BOOL bedit, BOOL /* check for custom form */ if (getcfg(lbs->name, "Custom form", str, sizeof(str))) { + /* check if file starts with an absolute directory */ + if (str[0] == DIR_SEPARATOR || str[1] == ':') + strcpy(file_name, str); + else { + strlcpy(file_name, logbook_dir, sizeof(file_name)); + strlcat(file_name, str, sizeof(file_name)); + } send_file_direct(str); return; }