From df24564d6bd38a32ee1023e62c150572ecfbd3b7 Mon Sep 17 00:00:00 2001 From: eelke Date: Mon, 5 Sep 2022 08:02:00 +0200 Subject: [PATCH] fix save connection password on uninitialized manager did not save it did initialize the manager --- pglab/ConnectionController.cpp | 5 ++++- ...-password-on-uninitialized-manager-591761764efbabb8.yaml | 6 ++++++ 2 files changed, 10 insertions(+), 1 deletion(-) create mode 100644 releasenotes/notes/fix-save-password-on-uninitialized-manager-591761764efbabb8.yaml diff --git a/pglab/ConnectionController.cpp b/pglab/ConnectionController.cpp index 93b4d24..0f00e9b 100644 --- a/pglab/ConnectionController.cpp +++ b/pglab/ConnectionController.cpp @@ -252,7 +252,7 @@ bool ConnectionController::UnlockPasswordManagerIfNeeded() if (m_passwordManager->initialized(user_cfg_db)) { if (!m_passwordManager->locked()) - return true; + return true; while (true) { @@ -269,7 +269,10 @@ bool ConnectionController::UnlockPasswordManagerIfNeeded() } } else + { InitializePasswordManager(); + return true; + } return false; } diff --git a/releasenotes/notes/fix-save-password-on-uninitialized-manager-591761764efbabb8.yaml b/releasenotes/notes/fix-save-password-on-uninitialized-manager-591761764efbabb8.yaml new file mode 100644 index 0000000..db6b4b3 --- /dev/null +++ b/releasenotes/notes/fix-save-password-on-uninitialized-manager-591761764efbabb8.yaml @@ -0,0 +1,6 @@ +--- +fixes: + - | + Fix that when saving the password of a connection to an uninitialized password + manager the program did not save the password. It would correctly initialize + the password manager and saving worked the second time.