From 0b5b671dd9ced84188b032149033de1165fb28b1 Mon Sep 17 00:00:00 2001 From: "Lubomir I. Ivanov" Date: Wed, 9 Oct 2013 16:10:12 +0300 Subject: windows.c: use the USERNAME enviroment variable system_default_filename(): Use USERNAME, which should work for Windows XP and above. Signed-off-by: Lubomir I. Ivanov Signed-off-by: Dirk Hohndel --- windows.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/windows.c b/windows.c index eaa389447..ff6e2e036 100644 --- a/windows.c +++ b/windows.c @@ -15,7 +15,7 @@ const char *system_default_filename(void) int len; /* I don't think this works on Windows */ - user = getenv("LOGNAME"); + user = getenv("USERNAME"); if (! SUCCEEDED(SHGetFolderPath(NULL, CSIDL_APPDATA, NULL, 0, datapath))) { datapath[0] = '.'; datapath[1] = '\0'; -- cgit v1.2.3-70-g09d2