mirror of
https://github.com/sqlitebrowser/sqlitebrowser.git
synced 2026-01-20 11:00:44 -06:00
Fix editing encryption when using SQLCipher 4
It seems like we need to explicitly detach the newly encrypted database when changing the encryption settings and using SQLCipher 4. See issue #1829.
This commit is contained in:
@@ -3244,6 +3244,11 @@ void MainWindow::editEncryption()
|
||||
if (ok)
|
||||
ok = db.executeSQL(QString("PRAGMA sqlitebrowser_edit_encryption.user_version = %1;").arg(db.getPragma("user_version").toInt()), false, false);
|
||||
|
||||
// We need to detach the database before proceeding
|
||||
qApp->processEvents();
|
||||
if (ok)
|
||||
ok = db.executeSQL("DETACH sqlitebrowser_edit_encryption;", false, false);
|
||||
|
||||
// Check for errors
|
||||
qApp->processEvents();
|
||||
if(ok)
|
||||
|
||||
Reference in New Issue
Block a user