Commit 0e8c500ae126f5078ab1446f6639e6eb88346ab8

Tracey Emery 2020-02-04T00:47:30

fix broken build_folder logic

1
2
3
4
5
6
7
8
9
10
11
12
13
14
diff --git a/gotweb/gotweb.c b/gotweb/gotweb.c
index 60c969d..5dde781 100644
--- a/gotweb/gotweb.c
+++ b/gotweb/gotweb.c
@@ -3084,8 +3084,8 @@ gw_get_repo_tree(char **tree_html, struct gw_trans *gw_trans)
 
 		if (S_ISDIR(mode)) {
 			if (asprintf(&build_folder, "%s%s%s",
-			    gw_trans->repo_folder ? "/" : "",
 			    gw_trans->repo_folder ? gw_trans->repo_folder : "",
+			    gw_trans->repo_folder ? "/" : "",
 			    got_tree_entry_get_name(te)) == -1) {
 				error = got_error_from_errno(
 				    "asprintf");