Commit 0594e3efb75c806a53f2ef5693e55ee641788053

nulltoken 2011-03-03T19:36:54

Prevent _dirent_loose_load() from choking on empty folders

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/src/refs.c b/src/refs.c
index 02d9b6b..e8e87e7 100644
--- a/src/refs.c
+++ b/src/refs.c
@@ -537,7 +537,7 @@ static int _dirent_loose_load(void *data, char *full_path)
 	int error;
 
 	if (gitfo_isdir(full_path) == GIT_SUCCESS)
-		gitfo_dirent(full_path, GIT_PATH_MAX, _dirent_loose_load, repository);
+		return gitfo_dirent(full_path, GIT_PATH_MAX, _dirent_loose_load, repository);
 
 	file_path = full_path + strlen(repository->path_repository);
 	error = loose_lookup(&reference, repository, file_path, 1);