Commit 417472e317a8680123f2fa4f46e1e3c21315326d

Linquize 2013-09-20T09:02:58

Check error value from git_futils_find_template_dir

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
diff --git a/src/repository.c b/src/repository.c
index b95ee85..6dea487 100644
--- a/src/repository.c
+++ b/src/repository.c
@@ -1145,8 +1145,8 @@ static int repo_init_structure(
 		}
 
 		if (!tdir) {
-			git_futils_find_template_dir(&template_buf);
-			tdir = template_buf.ptr;
+			if ((error = git_futils_find_template_dir(&template_buf)) >= 0);
+				tdir = template_buf.ptr;
 			default_template = true;
 		}