summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorHarsh Shandilya <me@msfjarvis.dev>2020-12-10 21:06:45 +0530
committerGitHub <noreply@github.com>2020-12-10 21:06:45 +0530
commitc02ad427be3652298f4a07a5f1a0d68e4ac44c45 (patch)
treed5a0cb41547a0a6208b2b2b5931928e361f1e5e2 /app
parent29778e0e3da9f9c8b76c7ecaf92962779a7840ab (diff)
Try to fix missing `.gpg-id` files as well (#1246)
Diffstat (limited to 'app')
-rw-r--r--app/src/main/java/dev/msfjarvis/aps/ui/crypto/PasswordCreationActivity.kt5
-rw-r--r--app/src/main/res/values-fr/strings.xml1
-rw-r--r--app/src/main/res/values-pt-rBR/strings.xml1
-rw-r--r--app/src/main/res/values-ru/strings.xml1
-rw-r--r--app/src/main/res/values/strings.xml1
5 files changed, 1 insertions, 8 deletions
diff --git a/app/src/main/java/dev/msfjarvis/aps/ui/crypto/PasswordCreationActivity.kt b/app/src/main/java/dev/msfjarvis/aps/ui/crypto/PasswordCreationActivity.kt
index 403f6e2a..2ddcc8b8 100644
--- a/app/src/main/java/dev/msfjarvis/aps/ui/crypto/PasswordCreationActivity.kt
+++ b/app/src/main/java/dev/msfjarvis/aps/ui/crypto/PasswordCreationActivity.kt
@@ -335,10 +335,7 @@ class PasswordCreationActivity : BasePgpActivity(), OpenPgpServiceConnection.OnB
// pass enters the key ID into `.gpg-id`.
val repoRoot = PasswordRepository.getRepositoryDirectory()
val gpgIdentifierFile = File(repoRoot, directory.text.toString()).findTillRoot(".gpg-id", repoRoot)
- if (gpgIdentifierFile == null) {
- snackbar(message = resources.getString(R.string.failed_to_find_key_id))
- return@with
- }
+ ?: File(repoRoot, ".gpg-id").apply { createNewFile() }
val gpgIdentifiers = gpgIdentifierFile.readLines()
.filter { it.isNotBlank() }
.map { line ->
diff --git a/app/src/main/res/values-fr/strings.xml b/app/src/main/res/values-fr/strings.xml
index 10fa1130..cc4f6995 100644
--- a/app/src/main/res/values-fr/strings.xml
+++ b/app/src/main/res/values-fr/strings.xml
@@ -245,7 +245,6 @@
<!-- Password creation failure -->
<string name="password_creation_file_fail_title">Erreur</string>
<string name="exporting_passwords">Exportation des mots de passe…</string>
- <string name="failed_to_find_key_id">Impossible de localiser .gpg-id, votre dépôt est-il correctement configuré ?</string>
<string name="short_key_ids_unsupported">Un ID de clé dans .gpg-id est trop court, veuillez utiliser soit des identifiants de clés longs (16 caractères) soit des empreintes digitales (40 caractères)</string>
<string name="directory_hint">Dossier</string>
<string name="new_folder_set_gpg_key">Définir la clé GPG pour le dossier</string>
diff --git a/app/src/main/res/values-pt-rBR/strings.xml b/app/src/main/res/values-pt-rBR/strings.xml
index c45b2705..40b99b39 100644
--- a/app/src/main/res/values-pt-rBR/strings.xml
+++ b/app/src/main/res/values-pt-rBR/strings.xml
@@ -279,7 +279,6 @@
<string name="otp_import_success">Configuração TOTP importada com sucesso</string>
<string name="otp_import_failure">Falha ao importar a configuração TOTP</string>
<string name="exporting_passwords">Exportando senhas…</string>
- <string name="failed_to_find_key_id">Falha ao localizar .gpg-id, seu store está configurado corretamente?</string>
<string name="invalid_gpg_id">Encontrado .gpg-id, mas contém uma ID de chave inválida, fingerprint ou ID de usuário</string>
<string name="short_key_ids_unsupported">O ID de chave em .gpg-id é muito curto, por favor utilize os IDs de chaves longos (16 caracteres) ou fingerprints (40 caracteres)</string>
<string name="invalid_filename_text">Nome do arquivo não deve conter \'/\', defina o diretório acima</string>
diff --git a/app/src/main/res/values-ru/strings.xml b/app/src/main/res/values-ru/strings.xml
index baa49c74..d1f046ee 100644
--- a/app/src/main/res/values-ru/strings.xml
+++ b/app/src/main/res/values-ru/strings.xml
@@ -283,7 +283,6 @@
<string name="otp_import_success">Конфигурация TOTP успешно импортирована</string>
<string name="otp_import_failure">Не удалось импортировать конфигурацию TOTP</string>
<string name="exporting_passwords">Экспорт паролей…</string>
- <string name="failed_to_find_key_id">Не удалось найти .gpg-id, ваше хранилище настроено корректно?</string>
<string name="invalid_gpg_id">Найден .gpg-id, но он содержит неверный ID ключа, fingerprint или ID пользователя</string>
<string name="short_key_ids_unsupported">Идентификатор ключа в .gpg-id слишком короткий, пожалуйста, используйте длинные идентификаторы (16 символов) или fingerprint (40 символов)</string>
<string name="invalid_filename_text">Имя файла не должно содержать \'/\', укажите директорию выше</string>
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index 6ffadb9e..03a1689e 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -344,7 +344,6 @@
<string name="otp_import_success">Successfully imported TOTP configuration</string>
<string name="otp_import_failure">Failed to import TOTP configuration</string>
<string name="exporting_passwords">Exporting passwords…</string>
- <string name="failed_to_find_key_id">Failed to locate .gpg-id, is your store set up correctly?</string>
<string name="invalid_gpg_id">Found .gpg-id, but it contains an invalid key ID, fingerprint or user ID</string>
<string name="short_key_ids_unsupported">A key ID in .gpg-id is too short, please use either long key IDs (16 characters) or fingerprints (40 characters)</string>
<string name="invalid_filename_text">File name must not contain \'/\', set directory above</string>