diff --git a/snappymail/v/0.0.0/app/libraries/RainLoop/Actions.php b/snappymail/v/0.0.0/app/libraries/RainLoop/Actions.php index a2cd9ffe1..b5c0d1867 100644 --- a/snappymail/v/0.0.0/app/libraries/RainLoop/Actions.php +++ b/snappymail/v/0.0.0/app/libraries/RainLoop/Actions.php @@ -255,6 +255,14 @@ class Actions if ('sqlite' === $sDsnType) { $sUser = $sPassword = ''; $sDsn = 'sqlite:' . APP_PRIVATE_DATA . 'AddressBook.sqlite'; +/* + // TODO: use local db? + $homedir = $this->StorageProvider()->GenerateFilePath( + $oAccount, + \RainLoop\Providers\Storage\Enumerations\StorageType::ROOT + ); + $sDsn = 'sqlite:' . $homedir . '/AddressBook.sqlite'; +*/ } else { $sDsn = $sDsnType . ':' . \preg_replace('/^[a-z]+:/', '', $sDsn); } diff --git a/snappymail/v/0.0.0/app/libraries/RainLoop/Actions/Pgp.php b/snappymail/v/0.0.0/app/libraries/RainLoop/Actions/Pgp.php index c58f46530..b25450891 100644 --- a/snappymail/v/0.0.0/app/libraries/RainLoop/Actions/Pgp.php +++ b/snappymail/v/0.0.0/app/libraries/RainLoop/Actions/Pgp.php @@ -18,10 +18,10 @@ trait Pgp return null; } - $homedir = \dirname($this->StorageProvider()->GenerateFilePath( + $homedir = $this->StorageProvider()->GenerateFilePath( $oAccount, - \RainLoop\Providers\Storage\Enumerations\StorageType::PGP - )) . '/.gnupg'; + \RainLoop\Providers\Storage\Enumerations\StorageType::ROOT + ) . '/.gnupg'; if (!\is_dir($homedir)) { \mkdir($homedir, 0700, true); diff --git a/snappymail/v/0.0.0/app/libraries/RainLoop/Providers/Storage/Enumerations/StorageType.php b/snappymail/v/0.0.0/app/libraries/RainLoop/Providers/Storage/Enumerations/StorageType.php index 18fd63f74..0b3c29cb7 100644 --- a/snappymail/v/0.0.0/app/libraries/RainLoop/Providers/Storage/Enumerations/StorageType.php +++ b/snappymail/v/0.0.0/app/libraries/RainLoop/Providers/Storage/Enumerations/StorageType.php @@ -10,4 +10,5 @@ class StorageType const SIGN_ME = 4; const SESSION = 5; const PGP = 6; + const ROOT = 7; } diff --git a/snappymail/v/0.0.0/app/libraries/RainLoop/Providers/Storage/FileStorage.php b/snappymail/v/0.0.0/app/libraries/RainLoop/Providers/Storage/FileStorage.php index 1717e442f..36d415bfc 100644 --- a/snappymail/v/0.0.0/app/libraries/RainLoop/Providers/Storage/FileStorage.php +++ b/snappymail/v/0.0.0/app/libraries/RainLoop/Providers/Storage/FileStorage.php @@ -112,6 +112,8 @@ class FileStorage implements \RainLoop\Providers\Storage\IStorage $sSubFolder = '.sessions'; } else if (StorageType::PGP === $iStorageType) { $sSubFolder = '.pgp'; + } else if (StorageType::ROOT === $iStorageType) { + $sSubFolder = ''; } } @@ -125,6 +127,7 @@ class FileStorage implements \RainLoop\Providers\Storage\IStorage case StorageType::SESSION: case StorageType::CONFIG: case StorageType::PGP: + case StorageType::ROOT: if (empty($sEmail)) { return ''; }