From e6e6164cdef5ca16b61308237c3e1d15ee5ce91b Mon Sep 17 00:00:00 2001 From: tycrek Date: Tue, 15 Jun 2021 21:05:09 -0600 Subject: [PATCH] added ensureDir for thumbnails --- ass.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ass.js b/ass.js index 6372a01..8d53b0e 100755 --- a/ass.js +++ b/ass.js @@ -76,6 +76,9 @@ function preStartup() { fs.watch(path('auth.json'), { persistent: false }, (eventType, _filename) => eventType === 'change' && fs.readJson(path('auth.json')) .then((json) => (tokens.toString() != json.tokens.toString()) && (tokens = json.tokens) && (users = json.users) && log(`New token added: ${tokens[tokens.length - 1]}`)) .catch(console.error)); + + // Create thumbnails directory + fs.ensureDirSync(path('uploads/thumbnails')); } function startup() {