From c06844c374c145b2f05ae0800678f68acc9ae2e3 Mon Sep 17 00:00:00 2001 From: Carlos Cerrillo Date: Tue, 17 Dec 2013 10:13:14 +0100 Subject: [PATCH] Fix ```createCertificateBundle``` and ```getCertificates``` methods from ```OC_Mount_config``` to use ```OC_User::getHome``` to get the path --- apps/files_external/lib/config.php | 6 ++---- 1 file 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');