sha1_to_hex: properly terminate the SHA1
[git.git] / setup.c
diff --git a/setup.c b/setup.c
index bde590f..d3556ed 100644 (file)
--- a/setup.c
+++ b/setup.c
@@ -131,7 +131,7 @@ const char *setup_git_directory_gently(int *nongit_ok)
                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 {