Skip to content

Commit

Permalink
git_config: access() returns 0 on success, not > 0
Browse files Browse the repository at this point in the history
Another late-night bug. Sorry again.

Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Signed-off-by: Junio C Hamano <junkio@cox.net>
  • Loading branch information
Johannes Schindelin authored and Junio C Hamano committed Jun 20, 2006
1 parent 92a28be commit e33d061
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion config.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit e33d061

Please sign in to comment.