diff --git a/common/network/websocket.c b/common/network/websocket.c index f0d7f0b..72a101c 100644 --- a/common/network/websocket.c +++ b/common/network/websocket.c @@ -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, "
  • %s
  • ", names[i]->d_name, names[i]->d_name); + if (names[i]->d_type == DT_DIR) + sprintf(buf, "
  • %s/
  • ", names[i]->d_name, + names[i]->d_name); + else + sprintf(buf, "
  • %s
  • ", names[i]->d_name, + names[i]->d_name); + ws_send(ws_ctx, buf, strlen(buf)); }