mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-07-08 22:18:28 +03:00
Bugfix: gnupg dir failed when /tmp/snappymail is not writable
This commit is contained in:
parent
d69e45f7bf
commit
2aad2efc3c
1 changed files with 3 additions and 2 deletions
|
|
@ -39,7 +39,8 @@ trait Pgp
|
|||
// First try a symbolic link
|
||||
$tmpdir = \sys_get_temp_dir() . '/snappymail';
|
||||
// if (\RainLoop\Utils::inOpenBasedir($tmpdir) &&
|
||||
if (\is_dir($tmpdir) || \mkdir($tmpdir, 0700, true)) {
|
||||
is_dir($tmpdir) || \mkdir($tmpdir, 0700);
|
||||
if (\is_dir($tmpdir) && \is_writable($tmpdir)) {
|
||||
$link = $tmpdir . '/' . \md5($homedir);
|
||||
if (\is_link($link) || \symlink($homedir, $link)) {
|
||||
$homedir = $link;
|
||||
|
|
@ -57,7 +58,7 @@ trait Pgp
|
|||
}
|
||||
// if (\RainLoop\Utils::inOpenBasedir($tmpdir) &&
|
||||
if (\is_dir($tmpdir) || \mkdir($tmpdir, 0700, true)) {
|
||||
$homedir = $link;
|
||||
$homedir = $tmpdir;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue