]> source.dussan.org Git - nextcloud-server.git/commitdiff
delete file keys from the correct location
authorBjörn Schießle <schiessle@owncloud.com>
Tue, 25 Jun 2013 14:03:03 +0000 (16:03 +0200)
committerBjörn Schießle <schiessle@owncloud.com>
Fri, 5 Jul 2013 13:59:46 +0000 (15:59 +0200)
apps/files_encryption/lib/keymanager.php

index d43a0c28918d89fd294198726e3702d09fc74b4a..0f608843740578fa7f30608e172dc648874e29bc 100755 (executable)
@@ -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;