From f2ca5980e9ec27f94684088c153a218f08f8176e Mon Sep 17 00:00:00 2001
From: Lars Henriksen <LarsHenriksen@get2net.dk>
Date: Mon, 7 Jan 2019 21:24:46 +0100
Subject: Initialize data paths once only

Signed-off-by: Lars Henriksen <LarsHenriksen@get2net.dk>
Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
---
 src/args.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

(limited to 'src')

diff --git a/src/args.c b/src/args.c
index 9986886..52496cd 100644
--- a/src/args.c
+++ b/src/args.c
@@ -505,6 +505,9 @@ int parse_args(int argc, char **argv)
 		case 'D':
 			datadir = optarg;
 			break;
+		case 'c':
+			cfile = optarg;
+			break;
 		}
 	}
 	io_init(cfile, datadir, confdir);
@@ -522,8 +525,6 @@ int parse_args(int argc, char **argv)
 			query = 1;
 			break;
 		case 'c':
-			cfile = optarg;
-			io_init(cfile, datadir, confdir);
 			break;
 		case 'C':
 			break;
-- 
cgit v1.2.3-70-g09d2