mirror of
https://github.com/sbrl/Minetest-WorldEditAdditions.git
synced 2024-11-26 17:12:59 +00:00
docs: ....why wasn't this a problem *years* ago?
This commit is contained in:
parent
78e30f78a8
commit
259b332883
1 changed files with 2 additions and 0 deletions
|
@ -118,6 +118,8 @@ async function picture(source_image, alt, target_dir, urlpath, formats = "__AUTO
|
||||||
}
|
}
|
||||||
|
|
||||||
const target_original = path.join(target_dir, source_parsed.base);
|
const target_original = path.join(target_dir, source_parsed.base);
|
||||||
|
if (!fs.existsSync(path.dirname(target_original)))
|
||||||
|
await fs.promises.mkdir(path.dirname(target_original), { recursive: true });
|
||||||
await fs.promises.copyFile(source_image, target_original);
|
await fs.promises.copyFile(source_image, target_original);
|
||||||
|
|
||||||
const sources = await Promise.all(formats.map(async (format) => {
|
const sources = await Promise.all(formats.map(async (format) => {
|
||||||
|
|
Loading…
Reference in a new issue