From: Tommi Virtanen Date: Wed, 30 Nov 2005 15:37:10 +0000 (+0200) Subject: Do not attempt to access literal dirname "GIT_OBJECT_DIRECTORY". X-Git-Tag: v0.99.9l^2~25 X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=0738fc2192109f946c033b3b003cb10aace9554e;p=git.git 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 --- 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 {