diff --git a/plugins/nextcloud/index.php b/plugins/nextcloud/index.php index 37dd8006e..c6a31ae2d 100644 --- a/plugins/nextcloud/index.php +++ b/plugins/nextcloud/index.php @@ -328,6 +328,12 @@ class NextcloudPlugin extends \RainLoop\Plugins\AbstractPlugin $this->Config()->Get('plugin', 'ignoreSystemAddressbook', true) ); } +/* + if ('storage' === $sName || 'storage-local' === $sName) { + require_once __DIR__ . '/storage.php'; + $oDriver = new \NextcloudStorage(APP_PRIVATE_DATA.'storage', $sName === 'storage-local'); + } +*/ } } diff --git a/plugins/nextcloud/storage.php b/plugins/nextcloud/storage.php new file mode 100644 index 000000000..05f38fb82 --- /dev/null +++ b/plugins/nextcloud/storage.php @@ -0,0 +1,22 @@ +getUserSession()->getUser()->getUID(); + $sDataPath .= "/.config/{$sUID}/"; + if ($bMkDir && !\is_dir($sDataPath) && !\mkdir($sDataPath, 0700, true)) { + throw new \RainLoop\Exceptions\Exception('Can\'t make storage directory "'.$sDataPath.'"'); + } + } + return $sDataPath; + } +}