mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-09-08 17:07:03 +03:00
Resolve #325
This commit is contained in:
parent
fb6b84d920
commit
3d0421762a
2 changed files with 8 additions and 1 deletions
|
|
@ -23,6 +23,13 @@ trait Pgp
|
||||||
\RainLoop\Providers\Storage\Enumerations\StorageType::PGP
|
\RainLoop\Providers\Storage\Enumerations\StorageType::PGP
|
||||||
)) . '/.gnupg';
|
)) . '/.gnupg';
|
||||||
|
|
||||||
|
if (!\is_dir($homedir)) {
|
||||||
|
\mkdir($homedir, 0700, true);
|
||||||
|
}
|
||||||
|
if (!\is_writable($homedir)) {
|
||||||
|
throw new \Exception("gpg homedir '{$homedir}' not writable");
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Workaround error: socket name for '/very/long/path/to/.gnupg/S.gpg-agent.extra' is too long
|
* Workaround error: socket name for '/very/long/path/to/.gnupg/S.gpg-agent.extra' is too long
|
||||||
* BSD 4.4 max length = 104
|
* BSD 4.4 max length = 104
|
||||||
|
|
|
||||||
|
|
@ -85,7 +85,7 @@ class GPG
|
||||||
$this->options['homedir'] = \rtrim($homedir, '/\\');
|
$this->options['homedir'] = \rtrim($homedir, '/\\');
|
||||||
|
|
||||||
// the random seed file makes subsequent actions faster so only disable it if we have to.
|
// the random seed file makes subsequent actions faster so only disable it if we have to.
|
||||||
if ($this->options['homedir'] && !\is_writeable($this->options['homedir'])) {
|
if ($this->options['homedir'] && !\is_writable($this->options['homedir'])) {
|
||||||
$this->options['no-random-seed-file'] = true;
|
$this->options['no-random-seed-file'] = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue