diff options
Diffstat (limited to 'server/js/paths.js')
-rw-r--r-- | server/js/paths.js | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/server/js/paths.js b/server/js/paths.js index 3bf6824..003d9c0 100644 --- a/server/js/paths.js +++ b/server/js/paths.js @@ -6,10 +6,19 @@ const os = require('os'); function ensureFolder(folder) { - if (!fs.existsSync(folder)) + try { - fs.mkdirSync(folder, { recursive: true }); + if (!fs.existsSync(folder)) + { + fs.mkdirSync(folder, { recursive: true }); + } } + + catch (err) + { + console.log(err); + } + return folder; } |