mirror of
https://iceshrimp.dev/crimekillz/iceshrimp-161sh.git
synced 2024-11-23 04:33:50 +01:00
Update migrate.ts
This commit is contained in:
parent
1faa24fcb4
commit
e7fef006f1
@ -171,7 +171,7 @@ async function main() {
|
|||||||
md5: file.md5,
|
md5: file.md5,
|
||||||
name: file.filename,
|
name: file.filename,
|
||||||
type: file.contentType,
|
type: file.contentType,
|
||||||
properties: file.metadata.properties,
|
properties: file.metadata.properties || {},
|
||||||
size: file.length,
|
size: file.length,
|
||||||
url: file.metadata.url,
|
url: file.metadata.url,
|
||||||
uri: file.metadata.uri,
|
uri: file.metadata.uri,
|
||||||
@ -375,8 +375,13 @@ async function main() {
|
|||||||
const file = await _DriveFile.findOne({}, {
|
const file = await _DriveFile.findOne({}, {
|
||||||
skip: i
|
skip: i
|
||||||
});
|
});
|
||||||
|
try {
|
||||||
try {
|
try {
|
||||||
await migrateDriveFile(file);
|
await migrateDriveFile(file);
|
||||||
|
} catch (_) {
|
||||||
|
file.folderId = null;
|
||||||
|
await migrateDriveFile(file);
|
||||||
|
}
|
||||||
console.log(`FILE (${i + 1}/${allDriveFilesCount}) ${file._id} ${chalk.green('DONE')}`);
|
console.log(`FILE (${i + 1}/${allDriveFilesCount}) ${file._id} ${chalk.green('DONE')}`);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.log(`FILE (${i + 1}/${allDriveFilesCount}) ${file._id} ${chalk.red('ERR')}`);
|
console.log(`FILE (${i + 1}/${allDriveFilesCount}) ${file._id} ${chalk.red('ERR')}`);
|
||||||
|
Loading…
Reference in New Issue
Block a user