From: Guus Sliepen Date: Tue, 14 Apr 2015 09:20:24 +0000 (+0200) Subject: Fix --logfile without a filename on Windows. X-Git-Tag: release-1.0.26~11 X-Git-Url: https://git.tinc-vpn.org/git/browse?a=commitdiff_plain;h=0821e327f23d81e4b001479b9de62151a3c0a1bc;p=tinc Fix --logfile without a filename on Windows. On Windows, the log filename now defaults to "tinc.log" in the same directory as tinc.conf. --- diff --git a/src/tincd.c b/src/tincd.c index b6a6c29c..fda20c4b 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)