Commit 8faadc89 authored by nanahira's avatar nanahira

fix

parent 024be904
Pipeline #5401 passed with stages
in 2 minutes and 4 seconds
......@@ -53,8 +53,8 @@ export class ArchiveTask {
return archive;
}
addToTask(archiveTasks: ArchiveTask[]) {
if (this.role !== ArchiveType.Part && archiveTasks.some((t) => t.path === this.path)) {
addToTask(archiveTasks: ArchiveTask[], skipDupCheck?: boolean) {
if (!skipDupCheck && this.role !== ArchiveType.Part && archiveTasks.some((t) => t.path === this.path)) {
return;
}
archiveTasks.push(this);
......@@ -152,7 +152,7 @@ export class PackagerService extends ConsoleLogger {
buckets[extname] ??= [[], 0];
const bucket = buckets[extname];
if (bucket[1] + file.file.stats.size >= this.bucket_max) {
new ArchiveTask(ArchiveType.Part, bucket[0]).addToTask(pendingPartTasks);
new ArchiveTask(ArchiveType.Part, bucket[0]).addToTask(pendingPartTasks, true);
bucket[0] = [];
bucket[1] = 0;
} else {
......@@ -160,12 +160,12 @@ export class PackagerService extends ConsoleLogger {
bucket[1] += file.file.stats.size;
}
} else {
new ArchiveTask(ArchiveType.Part, [file]).addToTask(pendingPartTasks);
new ArchiveTask(ArchiveType.Part, [file]).addToTask(pendingPartTasks, true);
}
}
for (const bucket of Object.values(buckets)) {
if (bucket[0].length) {
new ArchiveTask(ArchiveType.Part, bucket[0]).addToTask(pendingPartTasks);
new ArchiveTask(ArchiveType.Part, bucket[0]).addToTask(pendingPartTasks, true);
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment