From 42d5489993e77a36b7ec9832b853ce1345d2d2e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=85=AC=E6=98=8E?= <83812544+Ed1s0nZ@users.noreply.github.com> Date: Wed, 25 Mar 2026 23:26:40 +0800 Subject: [PATCH] Add files via upload --- web/static/js/webshell.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/web/static/js/webshell.js b/web/static/js/webshell.js index c39696c7..564b4317 100644 --- a/web/static/js/webshell.js +++ b/web/static/js/webshell.js @@ -3028,6 +3028,9 @@ function parseWebshellListItems(rawOutput) { var items = []; for (var i = 0; i < lines.length; i++) { var line = lines[i]; + var trimmedLine = String(line || '').trim(); + // `ls -la` 首行常见 "total 12"(中文环境为 "总计 12"),不是文件项。 + if (/^(total|总计)\s+\d+$/i.test(trimmedLine)) continue; var name = ''; var isDir = false; var size = '';