Commit Diff


commit - de51a12a5befe30cf15a089998d0136d52856dc2
commit + fd8d60a2d11af314daec9c6c7ad0ea5c7ac0abd0
blob - 950bf547dcb54bd4de647bdc2afae1716e5ea0f3
blob + 2ed6735a30264d09cf3010f9aa71887a25d9a6b6
--- gotwebd/gotweb.c
+++ gotwebd/gotweb.c
@@ -855,18 +855,11 @@ gotweb_render_index(struct request *c)
 	struct transport *t = c->t;
 	struct querystring *qs = t->qs;
 	struct repo_dir *repo_dir = NULL;
-	DIR *d;
 	struct dirent **sd_dent = NULL;
 	unsigned int d_cnt, d_i, d_disp = 0;
 	unsigned int d_skipped = 0;
 	int type;
 
-	d = opendir(srv->repos_path);
-	if (d == NULL) {
-		error = got_error_from_errno2("opendir", srv->repos_path);
-		return error;
-	}
-
 	d_cnt = scandir(srv->repos_path, &sd_dent, NULL, alphasort);
 	if (d_cnt == -1) {
 		sd_dent = NULL;
@@ -947,8 +940,6 @@ done:
 			free(sd_dent[d_i]);
 		free(sd_dent);
 	}
-	if (d != NULL && closedir(d) == EOF && error == NULL)
-		error = got_error_from_errno("closedir");
 	return error;
 }