- Don't clear extraction resume state during hybrid mode (skipPostCleanup) - Mark ALL completed items as "Entpackt" after successful hybrid extraction to prevent full extraction from re-extracting already-extracted archives Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.6
parent
674cf101da
commit
520ef91d2d
@@ -4538,9 +4538,16 @@ export class DownloadManager extends EventEmitter {
|
||||
logger.warn(`Hybrid-Extract: ${result.failed} Archive fehlgeschlagen, wird beim finalen Durchlauf erneut versucht`);
|
||||
}
|
||||
|
||||
// Mark all hybrid items with final status.
|
||||
// Use completedItems (not just hybridItems) so that items not matched to any archive
|
||||
// also get marked — this prevents the final full extraction from re-running.
|
||||
const updatedAt = nowMs();
|
||||
for (const entry of hybridItems) {
|
||||
if (/^Entpacken \(hybrid\)/i.test(entry.fullStatus || "")) {
|
||||
const targetItems = result.extracted > 0 && result.failed === 0 ? completedItems : hybridItems;
|
||||
for (const entry of targetItems) {
|
||||
if (isExtractedLabel(entry.fullStatus)) {
|
||||
continue;
|
||||
}
|
||||
if (/^Entpacken \(hybrid\)/i.test(entry.fullStatus || "") || /^Fertig\b/i.test(entry.fullStatus || "")) {
|
||||
if (result.extracted > 0 && result.failed === 0) {
|
||||
entry.fullStatus = "Entpackt";
|
||||
} else {
|
||||
|
||||
@@ -1321,7 +1321,7 @@ export async function extractPackageArchives(options: ExtractOptions): Promise<{
|
||||
}
|
||||
}
|
||||
|
||||
if (failed === 0 && resumeCompleted.size >= allCandidates.length) {
|
||||
if (failed === 0 && resumeCompleted.size >= allCandidates.length && !options.skipPostCleanup) {
|
||||
clearExtractResumeState(options.packageDir, options.packageId);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user