From feb8d78e014950d8b1aea60e6de563aa55b53bcd Mon Sep 17 00:00:00 2001 From: Moyasee Date: Sun, 4 Jan 2026 21:10:37 +0200 Subject: [PATCH] fix: update password index initialization in tryPassword function for correct behavior --- src/main/services/7zip.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/services/7zip.ts b/src/main/services/7zip.ts index 0fa333dc..72c952c7 100644 --- a/src/main/services/7zip.ts +++ b/src/main/services/7zip.ts @@ -46,7 +46,7 @@ export class SevenZip { onProgress?: (progress: ExtractionProgress) => void ): Promise { return new Promise((resolve, reject) => { - const tryPassword = (index = -1) => { + const tryPassword = (index = 0) => { const password = passwords[index] ?? ""; logger.info( `Trying password "${password || "(empty)"}" on ${filePath}` @@ -115,7 +115,7 @@ export class SevenZip { }); }; - tryPassword(); + tryPassword(0); }); }