Update darkhttpd.c

Open link in new tab and keep the list.
This commit is contained in:
fernvenue
2022-09-11 12:16:06 +08:00
committed by GitHub
parent a981031e6f
commit c74007c017

View File

@@ -1985,7 +1985,11 @@ static void generate_dir_listing(struct connection *conn, const char *path,
urlencode(list[i]->name, safe_url); urlencode(list[i]->name, safe_url);
append(listing, "<a href=\""); if (list[i]->is_dir)
append(listing, "<a href=\"");
else {
append(listing, "<a target='_blank' href=\"");
}
append(listing, safe_url); append(listing, safe_url);
if (list[i]->is_dir) if (list[i]->is_dir)
append(listing, "/"); append(listing, "/");