luci-app-filemanager: fixed negative time zone parsing
authorDmitry R <rdmitry0911@gmail.com>
Fri, 6 Dec 2024 12:10:27 +0000 (07:10 -0500)
committerHannu Nyman <hannu.nyman@iki.fi>
Sat, 7 Dec 2024 16:07:08 +0000 (18:07 +0200)
Signed-off-by: Dmitry R <rdmitry0911@gmail.com>
applications/luci-app-filemanager/htdocs/luci-static/resources/view/system/filemanager.js

index e2362ed411358c3d140d3103a751bbc84b425d60..9e5066ddec66805284b00094aacfde37c0075a1d 100644 (file)
@@ -298,7 +298,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\:\.]{8,12}\s+[+-]\d{4})\s+(.+)$/);
                        if (!parts || parts.length < 7) {
                                console.warn('Failed to parse line:', line);
                                return;