commit 195d499a7798e044d2033e7ef74a7446714b2f4d from: Stefan Sperling via: Thomas Adam date: Tue Sep 09 15:15:17 2025 UTC fix gotwebd regress failure introduced with querystring changes A folder parameter addressing the root directory is expected to be an empty string rather than "/". commit - 9822808d41d777c56c4d846cd5c6dead306bcc4e commit + 195d499a7798e044d2033e7ef74a7446714b2f4d blob - 4e02723cfa513d44a94c8ecd52378d1dba8ac7de blob + ad48cea542fc03bd6eb3a344d839a13f6b8afaa3 --- gotwebd/gotweb.c +++ gotwebd/gotweb.c @@ -869,10 +869,14 @@ gotweb_render_url(struct request *c, struct gotweb_url } if (url->folder) { - tmp = gotweb_urlencode(url->folder); - if (tmp == NULL) - return -1; - r = tp_writef(c->tp, "%sfolder=%s", sep, tmp); + if (got_path_is_root_dir(url->folder)) + tmp = NULL; + else { + tmp = gotweb_urlencode(url->folder); + if (tmp == NULL) + return -1; + } + r = tp_writef(c->tp, "%sfolder=%s", sep, tmp ? tmp : ""); free(tmp); if (r == -1) return -1;