diff options
author | Vincent Torri <vincent.torri@gmail.com> | 2019-07-18 04:05:50 +0000 |
---|---|---|
committer | Marcel Hollerbach <mail@marcel-hollerbach.de> | 2019-07-18 08:29:56 +0200 |
commit | cad6b4ed40e008d42ae62a7257f2f58ee056794d (patch) | |
tree | 7e4ef4d7dd665280cbaa1838f8c49089919be71e /src/lib/eina/eina_vpath.c | |
parent | d902989b74cba94053b57daaa528d05b277ed3dd (diff) | |
download | efl-cad6b4ed40e008d42ae62a7257f2f58ee056794d.tar.gz |
Eina vpath: remove support of ~username vpath on Windowsdevs/bu5hm4n/buildtest
On Windows, one must be in kernel mode to obtain informations of other users
Differential Revision: https://phab.enlightenment.org/D9339
Diffstat (limited to 'src/lib/eina/eina_vpath.c')
-rw-r--r-- | src/lib/eina/eina_vpath.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/lib/eina/eina_vpath.c b/src/lib/eina/eina_vpath.c index 0717e928e0..c06ee5abe8 100644 --- a/src/lib/eina/eina_vpath.c +++ b/src/lib/eina/eina_vpath.c @@ -195,11 +195,11 @@ eina_vpath_shutdown(void) return EINA_TRUE; } +#ifdef HAVE_GETPWENT static Eina_Bool _fetch_user_homedir(char **str, const char *name, const char *error) { *str = NULL; -#ifdef HAVE_GETPWENT struct passwd *pwent; pwent = getpwnam(name); @@ -211,12 +211,8 @@ _fetch_user_homedir(char **str, const char *name, const char *error) *str = pwent->pw_dir; return EINA_TRUE; -#else - ERR("User fetching is disabled on this system\nThe string was: %s", error); - return EINA_FALSE; - (void) name; -#endif } +#endif static int _eina_vpath_resolve(const char *path, char *str, size_t size) @@ -232,6 +228,10 @@ _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 { const char *p; char *name; @@ -248,6 +248,7 @@ _eina_vpath_resolve(const char *path, char *str, size_t size) return 0; path = p; } +#endif if (home) { return snprintf(str, size, "%s%s", home, path); |