mirror of
https://github.com/Zagrios/bs-manager.git
synced 2026-07-03 14:08:25 +02:00
[feat-76] use "findEntry" instead of a for await loop
This commit is contained in:
@@ -349,15 +349,9 @@ export class BsModsManagerService {
|
||||
const zip = await BsmZipExtractor.fromPath(modPath);
|
||||
|
||||
try {
|
||||
let hasDll = false;
|
||||
for await (const entry of zip.entries()) {
|
||||
if (entry.fileName.endsWith(".dll")) {
|
||||
hasDll = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
const dll = await zip.findEntry(entry => entry.fileName.endsWith(".dll"));
|
||||
|
||||
if (!hasDll) {
|
||||
if (!dll) {
|
||||
log.warn("No \"dll\" found in zip", modPath);
|
||||
return [];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user