Skip to content

Commit

Permalink
luci-app-filemanager: fixed negative time zone parsing
Browse files Browse the repository at this point in the history
Signed-off-by: Dmitry R <[email protected]>
  • Loading branch information
rdmitry0911 authored and hnyman committed Dec 7, 2024
1 parent 46f8438 commit 679d3b8
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 679d3b8

Please sign in to comment.