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() {