From 3043dbfb95b7ea84d2d3478aef7cc3c28c8d4b85 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Schie=C3=9Fle?= Date: Tue, 25 Jun 2013 16:03:03 +0200 Subject: [PATCH] delete file keys from the correct location --- apps/files_encryption/lib/keymanager.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) 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;