Fix saving the new key to the settings if the 'remember key' option was set and the DB was rekeyed

This commit is contained in:
Miguel Jacq 2025-11-03 12:39:31 +11:00
parent 329e016f8d
commit ba6417e72f
Signed by: mig5
GPG key ID: 59B3F0C24135C6A9
3 changed files with 10 additions and 1 deletions

View file

@ -133,7 +133,7 @@ class DBManager:
raise RuntimeError("Database is not connected")
cur = self.conn.cursor()
# Change the encryption key of the currently open database
cur.execute(f"PRAGMA rekey = '{new_key}';")
cur.execute(f"PRAGMA rekey = '{new_key}';").fetchone()
self.conn.commit()
# Close and reopen with the new key to verify and restore PRAGMAs