luci-app-filemanager: fixed time parsing
authorjunjie zhang <[email protected]>
Fri, 28 Feb 2025 11:05:28 +0000 (19:05 +0800)
committerPaul Donald <[email protected]>
Tue, 2 Dec 2025 22:48:46 +0000 (23:48 +0100)
Signed-off-by: junjie zhang <[email protected]>
(cherry picked from commit e4bfd608bd24ad3df00ebdf90f4de14d91db3fb8)

applications/luci-app-filemanager/htdocs/luci-static/resources/view/system/filemanager.js

index f576e159a47aaa5a46e29f0042a77bebb4772188..e6b77550ef09e422ff3433567c2a3972b83f4ce1 100644 (file)
@@ -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;