From c260c7f4a3f3484bc24b8a2876446d4bb984eacb Mon Sep 17 00:00:00 2001 From: Art Cancro Date: Fri, 20 Jan 2012 14:33:39 -0500 Subject: [PATCH] Copied the -h logic from setup.c to sendcommand.c --- citadel/utils/sendcommand.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/citadel/utils/sendcommand.c b/citadel/utils/sendcommand.c index fde3d5c3c..bef37c7be 100644 --- a/citadel/utils/sendcommand.c +++ b/citadel/utils/sendcommand.c @@ -153,7 +153,13 @@ int main(int argc, char **argv) while ((a = getopt(argc, argv, "h:w:")) != EOF) { switch (a) { case 'h': - strcpy(relhome, optarg); + relh=optarg[0]!='/'; + if (!relh) { + strncpy(ctdl_home_directory, optarg, sizeof ctdl_home_directory); + } else { + strncpy(relhome, optarg, sizeof relhome); + } + home = 1; break; case 'w': watchdog = atoi(optarg); -- 2.30.2