Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/roundcube/roundcubemail.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAleksander Machniak <alec@alec.pl>2022-03-11 13:30:51 +0300
committerAleksander Machniak <alec@alec.pl>2022-03-11 13:30:51 +0300
commit401e761c027cf6f483510117f9a896197d14b30f (patch)
tree9b161d35cfa4d8df50cc42f23eef51fdb6f72f84
parent5208400bcd54babd244e6e39ef28ee2e629ef8fe (diff)
Enigma: Fix initial synchronization of private keys
-rw-r--r--plugins/enigma/lib/enigma_driver_gnupg.php7
1 files changed, 7 insertions, 0 deletions
diff --git a/plugins/enigma/lib/enigma_driver_gnupg.php b/plugins/enigma/lib/enigma_driver_gnupg.php
index 385309ee1..40f98ecb1 100644
--- a/plugins/enigma/lib/enigma_driver_gnupg.php
+++ b/plugins/enigma/lib/enigma_driver_gnupg.php
@@ -624,6 +624,13 @@ class enigma_driver_gnupg extends enigma_driver
continue;
}
+ // Private keys might be located in 'private-keys-v1.d' subdirectory. Make sure it exists.
+ if (strpos($file, '/private-keys-v1.d/')) {
+ if (!file_exists($this->homedir . '/private-keys-v1.d')) {
+ mkdir($this->homedir . '/private-keys-v1.d', 0700);
+ }
+ }
+
$tmpfile = $file . '.tmp';
if (file_put_contents($tmpfile, $data, LOCK_EX) === strlen($data)) {