Commit Diff


commit - fd34900dfd59a7967f4840865abbb4c9dd133ec8
commit + 57e88d7cd338f2bca9e5bcb9184ddda2ab435197
blob - a64f34c13f0c0970d9dd30e16a0b454e48353d13
blob + 171a7690a7a732a41b2c62d7f46f36a19e24a848
--- gotwebd/gotweb.c
+++ gotwebd/gotweb.c
@@ -1051,8 +1051,8 @@ gotweb_render_index(struct request *c)
 		goto done;
 
 	for (d_i = 0; d_i < d_cnt; d_i++) {
-		if (srv->max_repos > 0 && (d_i - 2) == srv->max_repos)
-			break; /* account for parent and self */
+		if (srv->max_repos > 0 && t->prev_disp == srv->max_repos)
+			break;
 
 		if (strcmp(sd_dent[d_i]->d_name, ".") == 0 ||
 		    strcmp(sd_dent[d_i]->d_name, "..") == 0)