Signed-off-by: Dmitry R <rdmitry0911@gmail.com>
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;