forked from enlightenment/efl
evil: get right Windows environment variables for home path.
@fix Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
This commit is contained in:
parent
256fc80dbc
commit
9350965125
|
@ -207,8 +207,17 @@ const char *
|
|||
evil_homedir_get(void)
|
||||
{
|
||||
char *homedir;
|
||||
char *homedrive;
|
||||
char *homepath;
|
||||
|
||||
homedir = getenv("HOME");
|
||||
if (!homedir)
|
||||
{
|
||||
homedrive = getenv("HOMEDRIVE");
|
||||
homepath = getenv("HOMEPATH");
|
||||
if (homedrive && homepath)
|
||||
asprintf(&homedir, "%s%s", homedrive, homepath);
|
||||
}
|
||||
if (!homedir) homedir = getenv("USERPROFILE");
|
||||
if (!homedir) homedir = getenv("WINDIR");
|
||||
if (!homedir) homedir="C:\\";
|
||||
|
|
Loading…
Reference in New Issue