git_config: access() returns 0 on success, not > 0
Another late-night bug. Sorry again. Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
Johannes Schindelin committed
Jun 20, 2006 at 09:51 UTC
e33d0611c0dd438ed9c1960518540c707201707a
1 file changed
+1
-1
config.c
+1
-1
@@ -335,7 +335,7 @@ int git_config(config_fn_t fn)
335
336
if (home) {
337
char *user_config = strdup(mkpath("%s/.gitconfig", home));
338
- if (access(user_config, R_OK) > 0)
338
+ if (!access(user_config, R_OK))
339
ret = git_config_from_file(fn, user_config);
340
free(user_config);
341
}