Skip to content

Commit

Permalink
Fix bug
Browse files Browse the repository at this point in the history
  • Loading branch information
lifegpc committed Jun 7, 2024
1 parent 3980c8e commit 55fd040
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions tasks/import.ts
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,10 @@ class FileLoader {
#get_zip(_name: string) {
return null;
}
get_file(name: string) {
get_file(name: string, index: number) {
if (this.#has_prefix) {
name = `${index.toString().padStart(3, "0")}_${name}`;
}
let t = this.#get_file(name);
if (t) return t;
const ext = extname(name);
Expand Down Expand Up @@ -271,7 +274,7 @@ export async function import_task(task: Task, manager: TaskManager) {
);

async function import_img(i: Page) {
const opath = f.get_file(i.name);
const opath = f.get_file(i.name, i.index);
if (!opath) {
console.log("File not found");
return;
Expand Down

0 comments on commit 55fd040

Please sign in to comment.