支持大文件
Some checks failed
CI/CD / Code Check (push) Has been cancelled
CI/CD / Build Windows (push) Has been cancelled

This commit is contained in:
2026-03-15 09:02:02 +08:00
parent 4654f36202
commit 5c278e1925
12 changed files with 410 additions and 177 deletions

View File

@@ -550,12 +550,12 @@ export class ModCheckService {
jarData = fs.readFileSync(file.filename);
}
const { Azip } = await import("../utils/ziplib.js");
const zipEntries = Azip(jarData);
const { yauzl_promise } = await import("../utils/ziplib.js");
const zipEntries = await yauzl_promise(jarData);
for (const entry of zipEntries) {
if (entry.entryName === iconPath || entry.entryName.endsWith(iconPath)) {
const data = await entry.getData();
if (entry.fileName === iconPath || entry.fileName.endsWith(iconPath)) {
const data = await entry.ReadEntry;
const ext = iconPath.split('.').pop()?.toLowerCase();
const mimeType = ext === 'png' ? 'png' : 'jpeg';