From 1aa3fb203c4c693ec250d9234f3662cd2a9bb0e0 Mon Sep 17 00:00:00 2001 From: Salem Yaslem Date: Tue, 6 Jun 2023 04:08:33 +0300 Subject: [PATCH] support xz --- composables/files-manager.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/composables/files-manager.ts b/composables/files-manager.ts index 60bab1f..0df85ed 100644 --- a/composables/files-manager.ts +++ b/composables/files-manager.ts @@ -47,8 +47,8 @@ export class FilesManager { // parse files list let unorganizedFiles = filesString!.map((fileString) => { - let file: RegExpMatchArray = /\d{4}-\d{2}-\d{2}\s+\d{2}:\d{2}:\d{2}\s+(?[AD.]+)\s+(?\d+)\s+(?\d+)\s+(?.+)[\n\r]{0,}/.exec(fileString)!; - let isFolder = file.groups!.type.indexOf("D") > -1 ? true : false; + let file: RegExpMatchArray = /[\s+|(\d{4}-\d{2}-\d{2}\s+\d{2}:\d{2}:\d{2})]\s+(?[AD.]+)\s+(?\d+)\s+(?\d+)\s+(?.+)[\n\r]{0,}/.exec(fileString)!; + let isFolder = file.groups!.type?.indexOf("D") > -1 ? true : false; return { name: file.groups!.path.lastIndexOf('/') > -1 ? file.groups!.path.substring(file.groups!.path.lastIndexOf('/') + 1) : file.groups!.path, path: `/${file.groups!.path}`, @@ -116,6 +116,7 @@ export class FilesManager { while (!breakLoop) { await new Promise((resolve) => { if (lastLength == this.consoleOutputBuffer.length) { + breakLoop = true; return; }