aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKana <[email protected]>2021-09-02 02:04:57 +0900
committerGitHub <[email protected]>2021-09-02 02:04:57 +0900
commit58864852d1706afc5715e61b144fb504b29e3b7d (patch)
tree260ea0248e2c9cc3924fa6c40181fa794d5a1c90
parentUpdate db location (diff)
downloadhost.fuwn.me-58864852d1706afc5715e61b144fb504b29e3b7d.tar.xz
host.fuwn.me-58864852d1706afc5715e61b144fb504b29e3b7d.zip
fix: update upload directories
-rw-r--r--src/api/scripts/databaseMigration.js6
1 files 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);