1. Stefan Saasen
  2. git


Tommi Virtanen  committed 0738fc2

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>

  • Participants
  • Parent commits 5620518
  • Branches master

Comments (0)

Files changed (1)

File setup.c

View file
 		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 {