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 {
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
You can’t perform that action at this time.
0 commit comments