From 0738fc2192109f946c033b3b003cb10aace9554e Mon Sep 17 00:00:00 2001 From: Tommi Virtanen Date: Wed, 30 Nov 2005 17:37:10 +0200 Subject: [PATCH] Do not attempt to access literal dirname "GIT_OBJECT_DIRECTORY". Dereference the environment variable before using it. Signed-off-by: Tommi Virtanen Signed-off-by: Junio C Hamano --- setup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.c b/setup.c index cc44a724..3286a568 100644 --- a/setup.c +++ b/setup.c @@ -116,7 +116,7 @@ static const char *setup_git_directory_1(void) if (validate_symref(path)) goto bad_dir_environ; if (getenv(DB_ENVIRONMENT)) { - if (access(DB_ENVIRONMENT, X_OK)) + if (access(getenv(DB_ENVIRONMENT), X_OK)) goto bad_dir_environ; } else { -- 2.11.0