From 11d0eef8ccbbfaf7dee6fa4a58b9778c16bec895 Mon Sep 17 00:00:00 2001 From: Florin Peter Date: Thu, 25 Apr 2013 15:21:11 +0200 Subject: [PATCH] fixed webdav errors, now webdav up - and downloads are full working --- apps/files_encryption/hooks/hooks.php | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/apps/files_encryption/hooks/hooks.php b/apps/files_encryption/hooks/hooks.php index 88ec64b492..2ac74ad6c4 100644 --- a/apps/files_encryption/hooks/hooks.php +++ b/apps/files_encryption/hooks/hooks.php @@ -40,7 +40,8 @@ class Hooks { // Manually initialise Filesystem{} singleton with correct // fake root path, in order to avoid fatal webdav errors - \OC\Files\Filesystem::init( $params['uid'], '/' . 'files' . '/' ); + // NOTE: disabled because this give errors on webdav! + //\OC\Files\Filesystem::init( $params['uid'], '/' . 'files' . '/' ); $view = new \OC_FilesystemView( '/' ); @@ -66,8 +67,10 @@ class Hooks { $session = new Session( $view ); $session->setPrivateKey( $privateKey, $params['uid'] ); - - $view1 = new \OC_FilesystemView( '/' . $params['uid'] ); + + //FIXME: disabled because it gets called each time a user do an operation on iPhone + //FIXME: we need a better place doing this and maybe only one time or by user + /*$view1 = new \OC_FilesystemView( '/' . $params['uid'] ); // Set legacy encryption key if it exists, to support // depreciated encryption system @@ -86,12 +89,12 @@ class Hooks { $publicKey = Keymanager::getPublicKey( $view, $params['uid'] ); - \OC_FileProxy::$enabled = false; + \OC_FileProxy::$enabled = false;*/ // Encrypt existing user files: // This serves to upgrade old versions of the encryption // app (see appinfo/spec.txt) - if ( + /*if ( $util->encryptAll( $publicKey, '/' . $params['uid'] . '/' . 'files', $session->getLegacyKey(), $params['password'] ) ) { @@ -100,7 +103,7 @@ class Hooks { , \OC_Log::INFO ); - } + }*/ return true;