From a16391742875807264d6ee39a565d1a117eab96f Mon Sep 17 00:00:00 2001 From: Nick Playfair <842413+nplayfair@users.noreply.github.com> Date: Sun, 15 Jun 2025 12:51:05 +0100 Subject: [PATCH] Revert to fs-extra version of ensureDirSync just to be safe --- index.js | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/index.js b/index.js index 1b2f96d..e5a762f 100644 --- a/index.js +++ b/index.js @@ -1,6 +1,6 @@ //Modules const AdmZip = require('adm-zip'); -const { emptyDirSync } = require('fs-extra'); +const { emptyDirSync, ensureDirSync } = require('fs-extra'); const path = require('path'); const pcbStackup = require('pcb-stackup'); const sharp = require('sharp'); @@ -10,19 +10,9 @@ const { existsSync, accessSync, createReadStream, - mkdirSync, - chmodSync, constants, } = require('node:fs'); -//ensureDirSync method -function ensureDirSync(directory) { - if (!existsSync(directory)) { - mkdirSync(directory, { recursive: true }); - chmodSync(directory, 0o644); - } -} - //Class definition class ImageGenerator { constructor(folderConfig, imgConfig, layerNames) {