summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorThomas Müller <thomas.mueller@tmit.eu>2015-03-30 22:36:48 +0200
committerThomas Müller <thomas.mueller@tmit.eu>2015-04-07 13:30:28 +0200
commitdbdd754c3fc37dc3100a9741f956d913e6d64576 (patch)
tree9aa55408b331d219a72cd53e2947ef8f06db85ce /lib
parent00338f9dca97fd7b48d96201fd607cf460c385ff (diff)
downloadnextcloud-server-dbdd754c3fc37dc3100a9741f956d913e6d64576.tar.gz
nextcloud-server-dbdd754c3fc37dc3100a9741f956d913e6d64576.zip
Further cleanup of files_encryption
Diffstat (limited to 'lib')
-rw-r--r--lib/base.php3
-rw-r--r--lib/private/app.php2
-rw-r--r--lib/private/connector/sabre/file.php4
-rw-r--r--lib/private/encryption/keys/storage.php6
4 files changed, 7 insertions, 8 deletions
diff --git a/lib/base.php b/lib/base.php
index 5d1e16296c0..44395be627d 100644
--- a/lib/base.php
+++ b/lib/base.php
@@ -743,9 +743,6 @@ class OC {
);
\OCP\Util::connectHook('OCP\Share', 'post_shared', $updater, 'postShared');
\OCP\Util::connectHook('OCP\Share', 'post_unshare', $updater, 'postUnshared');
-
- //\OCP\Util::connectHook('OC_Filesystem', 'post_umount', 'OCA\Files_Encryption\Hooks', 'postUnmount');
- //\OCP\Util::connectHook('OC_Filesystem', 'umount', 'OCA\Files_Encryption\Hooks', 'preUnmount');
}
}
diff --git a/lib/private/app.php b/lib/private/app.php
index 84bc23608fb..4b3d4b82b82 100644
--- a/lib/private/app.php
+++ b/lib/private/app.php
@@ -207,7 +207,7 @@ class OC_App {
self::$shippedApps = json_decode(file_get_contents($shippedJson), true);
self::$shippedApps = self::$shippedApps['shippedApps'];
} else {
- self::$shippedApps = ['files', 'files_encryption', 'files_external',
+ self::$shippedApps = ['files', 'encryption', 'files_external',
'files_sharing', 'files_trashbin', 'files_versions', 'provisioning_api',
'user_ldap', 'user_webdavauth'];
}
diff --git a/lib/private/connector/sabre/file.php b/lib/private/connector/sabre/file.php
index 5b8cb17a81c..58579f42dfc 100644
--- a/lib/private/connector/sabre/file.php
+++ b/lib/private/connector/sabre/file.php
@@ -35,6 +35,8 @@
namespace OC\Connector\Sabre;
+use OC\Encryption\Exceptions\GenericEncryptionException;
+
class File extends \OC\Connector\Sabre\Node implements \Sabre\DAV\IFile {
/**
@@ -125,7 +127,7 @@ class File extends \OC\Connector\Sabre\Node implements \Sabre\DAV\IFile {
} catch (\OCP\Files\LockNotAcquiredException $e) {
// the file is currently being written to by another process
throw new \OC\Connector\Sabre\Exception\FileLocked($e->getMessage(), $e->getCode(), $e);
- } catch (\OCA\Files_Encryption\Exception\EncryptionException $e) {
+ } catch (GenericEncryptionException $e) {
throw new \Sabre\DAV\Exception\Forbidden($e->getMessage());
} catch (\OCP\Files\StorageNotAvailableException $e) {
throw new \Sabre\DAV\Exception\ServiceUnavailable("Failed to write file contents: ".$e->getMessage());
diff --git a/lib/private/encryption/keys/storage.php b/lib/private/encryption/keys/storage.php
index 041db2a2cb8..82753df1dc7 100644
--- a/lib/private/encryption/keys/storage.php
+++ b/lib/private/encryption/keys/storage.php
@@ -23,9 +23,9 @@
namespace OC\Encryption\Keys;
+use OC\Encryption\Exceptions\GenericEncryptionException;
use OC\Encryption\Util;
use OC\Files\View;
-use OCA\Files_Encryption\Exception\EncryptionException;
class Storage implements \OCP\Encryption\Keys\IStorage {
@@ -253,13 +253,13 @@ class Storage implements \OCP\Encryption\Keys\IStorage {
*
* @param string $path path to the file, relative to data/
* @return string
- * @throws EncryptionException
+ * @throws GenericEncryptionException
* @internal param string $keyId
*/
private function getFileKeyDir($path) {
if ($this->view->is_dir($path)) {
- throw new EncryptionException('file was expected but directory was given', EncryptionException::GENERIC);
+ throw new GenericEncryptionException('file was expected but directory was given');
}
list($owner, $filename) = $this->util->getUidAndFilename($path);