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
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1985,7 +1985,11 @@ static void generate_dir_listing(struct connection *conn, const char *path,
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);
if (list[i]->is_dir)
append(listing, "/");