From: junjie zhang Date: Fri, 28 Feb 2025 11:05:28 +0000 (+0800) Subject: luci-app-filemanager: fixed time parsing X-Git-Url: http://git.openwrt.org/?a=commitdiff_plain;h=2ae5a3e8711ef6a71287b83d93989c3cdf381203;p=project%2Fluci.git luci-app-filemanager: fixed time parsing Signed-off-by: junjie zhang (cherry picked from commit e4bfd608bd24ad3df00ebdf90f4de14d91db3fb8) --- diff --git a/applications/luci-app-filemanager/htdocs/luci-static/resources/view/system/filemanager.js b/applications/luci-app-filemanager/htdocs/luci-static/resources/view/system/filemanager.js index f576e159a4..e6b77550ef 100644 --- a/applications/luci-app-filemanager/htdocs/luci-static/resources/view/system/filemanager.js +++ b/applications/luci-app-filemanager/htdocs/luci-static/resources/view/system/filemanager.js @@ -302,7 +302,7 @@ function getFileList(path) { lines.forEach(function(line) { if (line.startsWith('total') || !line.trim()) return; // Parse the output line from 'ls' command - var parts = line.match(/^([\-dl])[rwx\-]{2}[rwx\-Ss]{1}[rwx\-]{2}[rwx\-Ss]{1}[rwx\-]{2}[rwx\-Tt]{1}\s+\d+\s+(\S+)\s+(\S+)\s+(\d+)\s+([\d\-]+\s+[\d\:\.]{8,12}\s+[+-]\d{4})\s+(.+)$/); + var parts = line.match(/^([\-dl])[rwx\-]{2}[rwx\-Ss]{1}[rwx\-]{2}[rwx\-Ss]{1}[rwx\-]{2}[rwx\-Tt]{1}\s+\d+\s+(\S+)\s+(\S+)\s+(\d+)\s+([\d\-]+\s+\d{2}:\d{2}:\d{2}(?:\.\d+)?\s+[+-]\d{4})\s+(.+)$/); if (!parts || parts.length < 7) { console.warn('Failed to parse line:', line); return;