File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -65,7 +65,16 @@ export class RustSdkCryptoStorageProvider implements ICryptoStorageProvider {
65
65
const previousDevicePath = path . join ( this . storagePath , sha256 ( ) . update ( legacyDeviceId ) . digest ( 'hex' ) ) ;
66
66
LogService . warn ( "RustSdkCryptoStorageProvider" , `Migrating path for SDK database for legacy device ${ legacyDeviceId } ` ) ;
67
67
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
+
69
78
return newPath ;
70
79
}
71
80
You can’t perform that action at this time.
0 commit comments