support xz

This commit is contained in:
Salem Yaslem 2023-06-06 04:08:33 +03:00
parent 3eb6809e85
commit 1aa3fb203c

View File

@ -47,8 +47,8 @@ export class FilesManager {
// parse files list // parse files list
let unorganizedFiles = filesString!.map((fileString) => { let unorganizedFiles = filesString!.map((fileString) => {
let file: RegExpMatchArray = /\d{4}-\d{2}-\d{2}\s+\d{2}:\d{2}:\d{2}\s+(?<type>[AD.]+)\s+(?<size>\d+)\s+(?<compressed>\d+)\s+(?<path>.+)[\n\r]{0,}/.exec(fileString)!; let file: RegExpMatchArray = /[\s+|(\d{4}-\d{2}-\d{2}\s+\d{2}:\d{2}:\d{2})]\s+(?<type>[AD.]+)\s+(?<size>\d+)\s+(?<compressed>\d+)\s+(?<path>.+)[\n\r]{0,}/.exec(fileString)!;
let isFolder = file.groups!.type.indexOf("D") > -1 ? true : false; let isFolder = file.groups!.type?.indexOf("D") > -1 ? true : false;
return { return {
name: file.groups!.path.lastIndexOf('/') > -1 ? file.groups!.path.substring(file.groups!.path.lastIndexOf('/') + 1) : file.groups!.path, name: file.groups!.path.lastIndexOf('/') > -1 ? file.groups!.path.substring(file.groups!.path.lastIndexOf('/') + 1) : file.groups!.path,
path: `/${file.groups!.path}`, path: `/${file.groups!.path}`,
@ -116,6 +116,7 @@ export class FilesManager {
while (!breakLoop) { while (!breakLoop) {
await new Promise((resolve) => { await new Promise((resolve) => {
if (lastLength == this.consoleOutputBuffer.length) { if (lastLength == this.consoleOutputBuffer.length) {
breakLoop = true;
return; return;
} }