mirror of
https://github.com/android-password-store/Android-Password-Store.git
synced 2026-04-22 06:58:42 +02:00
BaseGitActivity: don't remove saved password unnecessarily
if previousUrl is empty it means that this the first time the method is being called, and url has not been built yet. We let things slide for the first pass so that the actual logic only kicks in when it needs to. Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
This commit is contained in:
parent
47c2875e93
commit
77096c1702
|
|
@ -126,7 +126,7 @@ abstract class BaseGitActivity : AppCompatActivity() {
|
|||
PasswordRepository.addRemote("origin", newUrl, true)
|
||||
// HTTPS authentication sends the password to the server, so we must wipe the password when
|
||||
// the server is changed.
|
||||
if (newUrl != previousUrl && protocol == Protocol.Https)
|
||||
if (previousUrl.isNotEmpty() && newUrl != previousUrl && protocol == Protocol.Https)
|
||||
encryptedSettings.edit { remove("https_password") }
|
||||
url = newUrl
|
||||
return true
|
||||
|
|
|
|||
Loading…
Reference in a new issue