summaryrefslogtreecommitdiffstats
path: root/apps/files_external/lib
diff options
context:
space:
mode:
authorCarlos Cerrillo <ccerrillo@gmail.com>2013-12-17 10:13:14 +0100
committerCarlos Cerrillo <ccerrillo@gmail.com>2013-12-17 10:13:14 +0100
commitc06844c374c145b2f05ae0800678f68acc9ae2e3 (patch)
tree644f5c2f01fb15573be9e19df1861924cebb743e /apps/files_external/lib
parentb245e2e3d86299092448e3223b0d658d88206873 (diff)
downloadnextcloud-server-c06844c374c145b2f05ae0800678f68acc9ae2e3.tar.gz
nextcloud-server-c06844c374c145b2f05ae0800678f68acc9ae2e3.zip
Fix ```createCertificateBundle``` and ```getCertificates``` methods
from ```OC_Mount_config``` to use ```OC_User::getHome``` to get the path
Diffstat (limited to 'apps/files_external/lib')
-rwxr-xr-xapps/files_external/lib/config.php6
1 files changed, 2 insertions, 4 deletions
diff --git a/apps/files_external/lib/config.php b/apps/files_external/lib/config.php
index 12836c7b88c..373246a4297 100755
--- a/apps/files_external/lib/config.php
+++ b/apps/files_external/lib/config.php
@@ -382,8 +382,7 @@ class OC_Mount_Config {
* @return array
*/
public static function getCertificates() {
- $view = \OCP\Files::getStorage('files_external');
- $path=\OCP\Config::getSystemValue('datadirectory').$view->getAbsolutePath("").'uploads/';
+ $path=OC_User::getHome(OC_User::getUser()) . '/files_external/uploads/';
\OCP\Util::writeLog('files_external', 'checking path '.$path, \OCP\Util::INFO);
if ( ! is_dir($path)) {
//path might not exist (e.g. non-standard OC_User::getHome() value)
@@ -405,8 +404,7 @@ class OC_Mount_Config {
* creates certificate bundle
*/
public static function createCertificateBundle() {
- $view = \OCP\Files::getStorage("files_external");
- $path = \OCP\Config::getSystemValue('datadirectory').$view->getAbsolutePath("");
+ $path=OC_User::getHome(OC_User::getUser()) . '/files_external';
$certs = OC_Mount_Config::getCertificates();
$fh_certs = fopen($path."/rootcerts.crt", 'w');