mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-07-13 03:27:39 +03:00
GPG show error on view/export
This commit is contained in:
parent
d57300dd75
commit
5aa71a3ede
2 changed files with 4 additions and 3 deletions
|
|
@ -97,6 +97,7 @@ export const GnuPGUserStore = new class {
|
|||
}
|
||||
} catch (e) {
|
||||
Passphrases.delete(key);
|
||||
alert(e.message);
|
||||
}
|
||||
}
|
||||
return key.armor;
|
||||
|
|
|
|||
|
|
@ -1114,9 +1114,9 @@ class PGP extends Base implements \SnappyMail\PGP\PGPInterface
|
|||
foreach ($this->_openPipes->readPipeLines(self::FD_ERROR) as $line) {
|
||||
$this->_debug("\t{$line}");
|
||||
$errors[] = \preg_replace('/^gpg: /', '', $line);
|
||||
}
|
||||
if ($throw && $errors) {
|
||||
break;
|
||||
if ($throw && (\str_contains($line, 'error') || \str_contains($line, 'failed'))) {
|
||||
break 2;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue