Skip to content

Commit 1052547

Browse files
committed
MyFrameMain: if loading legacy bookmark secret, move to new location
re #200
1 parent a6221cf commit 1052547

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/gui/MyFrameMain.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2042,6 +2042,11 @@ void MyFrameMain::bookmarks_secrets_load(const wxString& bookmarkName,
20422042
store.Load("MultiVNC/Bookmarks/" + (user.IsEmpty() ? "" : user + "@") + host + ":" + port,
20432043
username,
20442044
password); // if Load() fails, password will still be empty
2045+
if (password.IsOk()) {
2046+
// side effect: if there was a password from the legacy location, move it to the new one
2047+
store.Delete("MultiVNC/Bookmarks/" + (user.IsEmpty() ? "" : user + "@") + host + ":" + port);
2048+
store.Save("MultiVNC/Bookmarks/" + bookmarkName + " VncPassword", wxEmptyString, password);
2049+
}
20452050
}
20462051
}
20472052
#endif

0 commit comments

Comments
 (0)