From 454fec7a9f0d92c0cb22d45955d14bbc70cd85ff Mon Sep 17 00:00:00 2001 From: SamTV12345 <40429738+samtv12345@users.noreply.github.com> Date: Wed, 24 Jul 2024 20:04:03 +0200 Subject: [PATCH] Create outdir if it does not exist. --- src/node/hooks/express/specialpages.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/node/hooks/express/specialpages.ts b/src/node/hooks/express/specialpages.ts index 14783a817..5f575d942 100644 --- a/src/node/hooks/express/specialpages.ts +++ b/src/node/hooks/express/specialpages.ts @@ -278,6 +278,10 @@ exports.expressCreateServer = async (hookName: string, args: any, cb: Function) const outdir = path.join(settings.root, 'var','js') + // Create the outdir if it doesn't exist + if (!fs.existsSync(outdir)) { + fs.mkdirSync(outdir); + } let fileNamePad: string let fileNameTimeSlider: string