diff options
-rwxr-xr-x | apps/files_encryption/lib/keymanager.php | 9 |
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; |