mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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 <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
4fee6077af
commit
0b5b671dd9
1 changed files with 1 additions and 1 deletions
|
@ -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';
|
||||
|
|
Loading…
Add table
Reference in a new issue