Browse Source

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>
maint
Johannes Schindelin 19 years ago committed by Junio C Hamano
parent
commit
e33d0611c0
  1. 2
      config.c

2
config.c

@ -335,7 +335,7 @@ int git_config(config_fn_t fn) @@ -335,7 +335,7 @@ int git_config(config_fn_t fn)

if (home) {
char *user_config = strdup(mkpath("%s/.gitconfig", home));
if (access(user_config, R_OK) > 0)
if (!access(user_config, R_OK))
ret = git_config_from_file(fn, user_config);
free(user_config);
}

Loading…
Cancel
Save