forked from enlightenment/efl
eina vpath - fix windows ~username handling to only error when used
we would always rrturn 0 on windows ... missing {} in block. fix that. @fix
This commit is contained in:
parent
ea6a6afef5
commit
ebdbbb593a
|
@ -230,11 +230,11 @@ _eina_vpath_resolve(const char *path, char *str, size_t size)
|
||||||
}
|
}
|
||||||
// ~username/ <- homedir of user "username"
|
// ~username/ <- homedir of user "username"
|
||||||
else
|
else
|
||||||
#ifndef HAVE_GETPWENT
|
|
||||||
ERR("User fetching is disabled on this system\nThe string was: %s", path);
|
|
||||||
return 0;
|
|
||||||
#else
|
|
||||||
{
|
{
|
||||||
|
#ifndef HAVE_GETPWENT
|
||||||
|
ERR("User fetching is disabled on this system\nThe string was: %s", path);
|
||||||
|
return 0;
|
||||||
|
#else
|
||||||
const char *p;
|
const char *p;
|
||||||
char *name;
|
char *name;
|
||||||
|
|
||||||
|
@ -249,8 +249,8 @@ _eina_vpath_resolve(const char *path, char *str, size_t size)
|
||||||
if (!_fetch_user_homedir(&home, name, path))
|
if (!_fetch_user_homedir(&home, name, path))
|
||||||
return 0;
|
return 0;
|
||||||
path = p;
|
path = p;
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
|
}
|
||||||
if (home)
|
if (home)
|
||||||
{
|
{
|
||||||
return snprintf(str, size, "%s%s", home, path);
|
return snprintf(str, size, "%s%s", home, path);
|
||||||
|
|
Loading…
Reference in New Issue