From 0821e327f23d81e4b001479b9de62151a3c0a1bc Mon Sep 17 00:00:00 2001 From: Guus Sliepen Date: Tue, 14 Apr 2015 11:20:24 +0200 Subject: [PATCH] Fix --logfile without a filename on Windows. On Windows, the log filename now defaults to "tinc.log" in the same directory as tinc.conf. --- src/tincd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/tincd.c b/src/tincd.c index b6a6c29..fda20c4 100644 --- a/src/tincd.c +++ b/src/tincd.c @@ -438,14 +438,14 @@ static void make_names(void) { #ifdef HAVE_MINGW if(!RegOpenKeyEx(HKEY_LOCAL_MACHINE, "SOFTWARE\\tinc", 0, KEY_READ, &key)) { if(!RegQueryValueEx(key, NULL, 0, 0, (LPBYTE)installdir, &len)) { - if(!logfilename) - xasprintf(&logfilename, "%s/log/%s.log", identname); if(!confbase) { if(netname) xasprintf(&confbase, "%s/%s", installdir, netname); else xasprintf(&confbase, "%s", installdir); } + if(!logfilename) + xasprintf(&logfilename, "%s/tinc.log", confbase); } RegCloseKey(key); if(*installdir) -- 2.25.1