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:
Carsten Haitzler 2020-07-30 11:13:37 +01:00
parent 56830b08df
commit 3163458619
1 changed files with 5 additions and 5 deletions

View File

@ -230,11 +230,11 @@ _eina_vpath_resolve(const char *path, char *str, size_t size)
}
// ~username/ <- homedir of user "username"
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;
char *name;
@ -249,8 +249,8 @@ _eina_vpath_resolve(const char *path, char *str, size_t size)
if (!_fetch_user_homedir(&home, name, path))
return 0;
path = p;
}
#endif
}
if (home)
{
return snprintf(str, size, "%s%s", home, path);