diff options
| author | Fabian Henneke <FabianHenneke@users.noreply.github.com> | 2020-08-24 12:03:33 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-08-24 15:33:33 +0530 |
| commit | d0b15cec49a41ec1ea51890ac7b7c8cb8515f6a4 (patch) | |
| tree | 7fcac03715ac7bfb5b371f4277c61b0ed5e82efd /app/src/main/java/com/zeapo/pwdstore/Migrations.kt | |
| parent | cbe780f31c64c1f668b35554929c09b8d25f2636 (diff) | |
| download | HardenedPass-d0b15cec49a41ec1ea51890ac7b7c8cb8515f6a4.tar.gz HardenedPass-d0b15cec49a41ec1ea51890ac7b7c8cb8515f6a4.zip | |
Improve Git server config activity (#1051)
Diffstat (limited to 'app/src/main/java/com/zeapo/pwdstore/Migrations.kt')
| -rw-r--r-- | app/src/main/java/com/zeapo/pwdstore/Migrations.kt | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/app/src/main/java/com/zeapo/pwdstore/Migrations.kt b/app/src/main/java/com/zeapo/pwdstore/Migrations.kt index 1e1943d8..d0221d9e 100644 --- a/app/src/main/java/com/zeapo/pwdstore/Migrations.kt +++ b/app/src/main/java/com/zeapo/pwdstore/Migrations.kt @@ -76,7 +76,11 @@ private fun migrateToGitUrlBasedConfig(context: Context) { remove(PreferenceKeys.GIT_REMOTE_SERVER) remove(PreferenceKeys.GIT_REMOTE_USERNAME) } - if (url == null || !GitSettings.updateUrlIfValid(url)) { + if (url == null || GitSettings.updateConnectionSettingsIfValid( + newProtocol = protocol, + newConnectionMode = GitSettings.connectionMode, + newUrl = url, + newBranch = GitSettings.branch) != GitSettings.UpdateConnectionSettingsResult.Valid) { e { "Failed to migrate to URL-based Git config, generated URL is invalid" } } } |
