summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>2020-07-30 11:13:37 +0100
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2020-07-30 11:14:41 +0100
commit316345861936fd259e15f56329b5810ff5861b5b (patch)
treeb54af9366b2b8e9fcf9498a0d62f2602f6d3af18
parent56830b08df43880d65dee0fa208eb7c8244eabad (diff)
eina vpath - fix windows ~username handling to only error when used
we would always rrturn 0 on windows ... missing {} in block. fix that. @fix
-rw-r--r--src/lib/eina/eina_vpath.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/lib/eina/eina_vpath.c b/src/lib/eina/eina_vpath.c
index 871612c64e..4ed82f955f 100644
--- a/src/lib/eina/eina_vpath.c
+++ b/src/lib/eina/eina_vpath.c
@@ -230,11 +230,11 @@ _eina_vpath_resolve(const char *path, char *str, size_t size)
230 } 230 }
231 // ~username/ <- homedir of user "username" 231 // ~username/ <- homedir of user "username"
232 else 232 else
233 {
233#ifndef HAVE_GETPWENT 234#ifndef HAVE_GETPWENT
234 ERR("User fetching is disabled on this system\nThe string was: %s", path); 235 ERR("User fetching is disabled on this system\nThe string was: %s", path);
235 return 0; 236 return 0;
236#else 237#else
237 {
238 const char *p; 238 const char *p;
239 char *name; 239 char *name;
240 240
@@ -249,8 +249,8 @@ _eina_vpath_resolve(const char *path, char *str, size_t size)
249 if (!_fetch_user_homedir(&home, name, path)) 249 if (!_fetch_user_homedir(&home, name, path))
250 return 0; 250 return 0;
251 path = p; 251 path = p;
252 }
253#endif 252#endif
253 }
254 if (home) 254 if (home)
255 { 255 {
256 return snprintf(str, size, "%s%s", home, path); 256 return snprintf(str, size, "%s%s", home, path);