summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBjörn Schießle <schiessle@owncloud.com>2013-06-25 16:03:03 +0200
committerBjörn Schießle <schiessle@owncloud.com>2013-07-05 15:59:46 +0200
commit3043dbfb95b7ea84d2d3478aef7cc3c28c8d4b85 (patch)
tree2dd9cabe458b9f09c34828984e745e2cfb796a1e
parentabc2ee2e07e1e4f73e6e50aa3855d15ca92f6468 (diff)
downloadnextcloud-server-3043dbfb95b7ea84d2d3478aef7cc3c28c8d4b85.tar.gz
nextcloud-server-3043dbfb95b7ea84d2d3478aef7cc3c28c8d4b85.zip
delete file keys from the correct location
-rwxr-xr-xapps/files_encryption/lib/keymanager.php9
1 files changed, 8 insertions, 1 deletions
diff --git a/apps/files_encryption/lib/keymanager.php b/apps/files_encryption/lib/keymanager.php
index d43a0c28918..0f608843740 100755
--- a/apps/files_encryption/lib/keymanager.php
+++ b/apps/files_encryption/lib/keymanager.php
@@ -277,7 +277,14 @@ class Keymanager {
public static function deleteFileKey(\OC_FilesystemView $view, $userId, $path) {
$trimmed = ltrim($path, '/');
- $keyPath = '/' . $userId . '/files_encryption/keyfiles/' . $trimmed;
+
+ $util = new Util($view, \OCP\User::getUser());
+
+ if($util->isSystemWideMountPoint($path)) {
+ $keyPath = '/files_encryption/keyfiles/' . $trimmed;
+ } else {
+ $keyPath = '/' . $userId . '/files_encryption/keyfiles/' . $trimmed;
+ }
$result = false;