diff --git a/package.json b/package.json index 14ea365..4f51fae 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "real-debrid-downloader", - "version": "1.4.79", + "version": "1.4.80", "description": "Real-Debrid Downloader Desktop (Electron + React + TypeScript)", "main": "build/main/main/main.js", "author": "Sucukdeluxe", diff --git a/src/main/extractor.ts b/src/main/extractor.ts index f0e159f..917aaec 100644 --- a/src/main/extractor.ts +++ b/src/main/extractor.ts @@ -272,7 +272,9 @@ async function writeExtractResumeState(packageDir: string, completedArchives: Se .map((name) => archiveNameKey(name)) .sort((a, b) => a.localeCompare(b)) }; - await fs.promises.writeFile(progressPath, JSON.stringify(payload, null, 2), "utf8"); + const tmpPath = progressPath + ".tmp"; + await fs.promises.writeFile(tmpPath, JSON.stringify(payload, null, 2), "utf8"); + await fs.promises.rename(tmpPath, progressPath); } catch (error) { logger.warn(`ExtractResumeState schreiben fehlgeschlagen: ${String(error)}`); } @@ -929,7 +931,7 @@ export function collectArchiveCleanupTargets(sourceArchivePath: string, director if (/\.zip$/i.test(fileName)) { const stem = escapeRegex(fileName.replace(/\.zip$/i, "")); addMatching(new RegExp(`^${stem}\\.zip$`, "i")); - addMatching(new RegExp(`^${stem}\\.z\\d{2}$`, "i")); + addMatching(new RegExp(`^${stem}\\.z\\d{2,3}$`, "i")); return Array.from(targets); }