From 58864852d1706afc5715e61b144fb504b29e3b7d Mon Sep 17 00:00:00 2001 From: Kana Date: Thu, 2 Sep 2021 02:04:57 +0900 Subject: [PATCH] fix: update upload directories --- src/api/scripts/databaseMigration.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/api/scripts/databaseMigration.js b/src/api/scripts/databaseMigration.js index 44243a2..6376544 100644 --- a/src/api/scripts/databaseMigration.js +++ b/src/api/scripts/databaseMigration.js @@ -42,8 +42,8 @@ const start = async () => { console.log('Starting migration, this may take a few minutes...'); // Because I half assed it console.log('Please do NOT kill the process. Wait for it to finish.'); - await jetpack.removeAsync(nodePath.join(__dirname, '../../uploads/thumbs')); - await jetpack.dirAsync(nodePath.join(__dirname, '../../uploads/thumbs/square')); + await jetpack.removeAsync(nodePath.join(__dirname, '../../../uploads/thumbs')); + await jetpack.dirAsync(nodePath.join(__dirname, '../../../uploads/thumbs/square')); console.log('Finished deleting old thumbnails to create new ones'); const users = await oldDb.table('users').where('username', '<>', 'root'); @@ -121,7 +121,7 @@ const start = async () => { } const filename = file.name; - if (!jetpack.exists(nodePath.join(__dirname, '../../uploads', filename))) continue; + if (!jetpack.exists(nodePath.join(__dirname, '../../../uploads', filename))) continue; ThumbUtil.generateThumbnails(filename); } await newDb.batchInsert('files', filesToInsert, 20);