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) {
|
} catch (e) {
|
||||||
Passphrases.delete(key);
|
Passphrases.delete(key);
|
||||||
|
alert(e.message);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return key.armor;
|
return key.armor;
|
||||||
|
|
|
||||||
|
|
@ -1114,9 +1114,9 @@ class PGP extends Base implements \SnappyMail\PGP\PGPInterface
|
||||||
foreach ($this->_openPipes->readPipeLines(self::FD_ERROR) as $line) {
|
foreach ($this->_openPipes->readPipeLines(self::FD_ERROR) as $line) {
|
||||||
$this->_debug("\t{$line}");
|
$this->_debug("\t{$line}");
|
||||||
$errors[] = \preg_replace('/^gpg: /', '', $line);
|
$errors[] = \preg_replace('/^gpg: /', '', $line);
|
||||||
|
if ($throw && (\str_contains($line, 'error') || \str_contains($line, 'failed'))) {
|
||||||
|
break 2;
|
||||||
}
|
}
|
||||||
if ($throw && $errors) {
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue