Skip to content

Commit 1c031ef

Browse files
committed
Move all files but allow it to fail
1 parent 5672a5a commit 1c031ef

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

src/storage/RustSdkCryptoStorageProvider.ts

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,16 @@ export class RustSdkCryptoStorageProvider implements ICryptoStorageProvider {
6565
const previousDevicePath = path.join(this.storagePath, sha256().update(legacyDeviceId).digest('hex'));
6666
LogService.warn("RustSdkCryptoStorageProvider", `Migrating path for SDK database for legacy device ${legacyDeviceId}`);
6767
await mkdir(previousDevicePath);
68-
await rename(legacyFilePath, path.join(previousDevicePath, 'matrix-sdk-crypto.sqlite3'));
68+
await rename(legacyFilePath, path.join(previousDevicePath, 'matrix-sdk-crypto.sqlite3')).catch((ex) =>
69+
LogService.warn("RustSdkCryptoStorageProvider", `Could not migrate matrix-sdk-crypto.sqlite3`, ex)
70+
);
71+
await rename(legacyFilePath, path.join(previousDevicePath, 'matrix-sdk-crypto.sqlite3-shm')).catch((ex) =>
72+
LogService.warn("RustSdkCryptoStorageProvider", `Could not migrate matrix-sdk-crypto.sqlite3-shm`, ex)
73+
);
74+
await rename(legacyFilePath, path.join(previousDevicePath, 'matrix-sdk-crypto.sqlite3-wal')).catch((ex) =>
75+
LogService.warn("RustSdkCryptoStorageProvider", `Could not migrate matrix-sdk-crypto.sqlite3-wal`, ex)
76+
);
77+
6978
return newPath;
7079
}
7180

0 commit comments

Comments
 (0)