Commit d90bcdd6028e6305e7f6a3303937db80d4eb9cf4

Stefan Sperling 2020-02-17T20:42:02

improve error message when query contains an invalid repo name

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/gotweb/gotweb.c b/gotweb/gotweb.c
index a884509..1670677 100644
--- a/gotweb/gotweb.c
+++ b/gotweb/gotweb.c
@@ -1609,7 +1609,7 @@ gw_load_got_path(struct gw_trans *gw_trans, struct gw_dir *gw_dir)
 
 	dt = opendir(dir_test);
 	if (dt == NULL) {
-		error = got_error_from_errno2("bad path", dir_test);
+		error = got_error_path(gw_dir->name, GOT_ERR_NOT_GIT_REPO);
 		goto errored;
 	} else
 		opened = 1;