@matheusbsbs / matheus-bagliano / commits / 0738fc2192
Fork 0

Do not attempt to access literal dirname "GIT_OBJECT_DIRECTORY".

Dereference the environment variable before using it. Signed-off-by: Tommi Virtanen <tv@inoi.fi> Signed-off-by: Junio C Hamano <junkio@cox.net>

Tommi Virtanen committed Nov 30, 2005 at 17:37 UTC 0738fc2192109f946c033b3b003cb10aace9554e
1 file changed +1 -1
setup.c
+1 -1
@@ -116,7 +116,7 @@ static const char *setup_git_directory_1(void)
116 if (validate_symref(path))
117 goto bad_dir_environ;
118 if (getenv(DB_ENVIRONMENT)) {
119 - if (access(DB_ENVIRONMENT, X_OK))
119 + if (access(getenv(DB_ENVIRONMENT), X_OK))
120 goto bad_dir_environ;
121 }
122 else {