mirror of
https://github.com/kasmtech/KasmVNC.git
synced 2025-01-23 14:29:06 +01:00
Add trailing slash in dir listing
This commit is contained in:
parent
f64bd4f1a4
commit
14e08a2067
@ -779,7 +779,13 @@ static void dirlisting(ws_ctx_t *ws_ctx, const char fullpath[], const char path[
|
||||
if (!strcmp(names[i]->d_name, ".") || !strcmp(names[i]->d_name, ".."))
|
||||
continue;
|
||||
|
||||
sprintf(buf, "<li><a href=\"%s\">%s</a></li>", names[i]->d_name, names[i]->d_name);
|
||||
if (names[i]->d_type == DT_DIR)
|
||||
sprintf(buf, "<li><a href=\"%s/\">%s/</a></li>", names[i]->d_name,
|
||||
names[i]->d_name);
|
||||
else
|
||||
sprintf(buf, "<li><a href=\"%s\">%s</a></li>", names[i]->d_name,
|
||||
names[i]->d_name);
|
||||
|
||||
ws_send(ws_ctx, buf, strlen(buf));
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user