Skip to content

Commit 92af3af

Browse files
committed
Write file sequentially
1 parent 038a394 commit 92af3af

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

src/processors/obfProcessor.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -528,7 +528,7 @@ class ObfProcessor extends BaseProcessor {
528528
// Store the ZIP file reference for image extraction
529529
this.imageCache.clear(); // Clear cache for new file
530530

531-
console.log('[OBF] Detected zip archive, extracting .obf files');
531+
console.log('[OBF] Detected zip archive or directory, extracting .obf files');
532532

533533
// List manifest and OBF files
534534
const filesInZip =
@@ -791,9 +791,10 @@ class ObfProcessor extends BaseProcessor {
791791
} else {
792792
console.log('[OBF] Saving to directory:', outputPath);
793793
if (!(await pathExists(outputPath))) await mkDir(outputPath);
794-
await Promise.all(
795-
files.map((file) => writeBinaryToPath(join(outputPath, file.name), file.data))
796-
);
794+
for (const file of files) {
795+
const filePath = join(outputPath, file.name);
796+
await writeBinaryToPath(filePath, file.data);
797+
}
797798
}
798799
}
799800
}

0 commit comments

Comments
 (0)