mirror of https://github.com/VERT-sh/VERT.git
parent
987f19565c
commit
ea7af00cec
|
@ -221,12 +221,15 @@ class Files {
|
||||||
for (let i = 0; i < files.files.length; i++) {
|
for (let i = 0; i < files.files.length; i++) {
|
||||||
const file = files.files[i];
|
const file = files.files[i];
|
||||||
const result = file.result;
|
const result = file.result;
|
||||||
|
let to = file.to;
|
||||||
|
if (!to.startsWith(".")) to = `.${to}`;
|
||||||
|
|
||||||
if (!result) {
|
if (!result) {
|
||||||
error(["files"], "No result found");
|
error(["files"], "No result found");
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
dlFiles.push({
|
dlFiles.push({
|
||||||
name: file.file.name.replace(/\.[^/.]+$/, "") + result.to,
|
name: file.file.name.replace(/\.[^/.]+$/, "") + to,
|
||||||
lastModified: Date.now(),
|
lastModified: Date.now(),
|
||||||
input: await result.file.arrayBuffer(),
|
input: await result.file.arrayBuffer(),
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue