Skip to content

Commit

Permalink
docs: ....why wasn't this a problem *years* ago?
Browse files Browse the repository at this point in the history
  • Loading branch information
sbrl committed Dec 26, 2023
1 parent 78e30f7 commit 259b332
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .docs/lib/HTMLPicture.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
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);

const sources = await Promise.all(formats.map(async (format) => {
Expand Down

0 comments on commit 259b332

Please sign in to comment.