From cdd816c930328f8ff721f9fa476184145eb3f41a Mon Sep 17 00:00:00 2001 From: Bjoern Schiessle Date: Mon, 16 Dec 2013 12:16:07 +0100 Subject: only remove encryption keys if a real file gets deleted, skip this method if a file outside of /data/user/files was deleted --- apps/files_encryption/lib/proxy.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'apps/files_encryption/lib') diff --git a/apps/files_encryption/lib/proxy.php b/apps/files_encryption/lib/proxy.php index 5ba3bfa784f..4a41c978139 100644 --- a/apps/files_encryption/lib/proxy.php +++ b/apps/files_encryption/lib/proxy.php @@ -182,8 +182,11 @@ class Proxy extends \OC_FileProxy { */ public function preUnlink($path) { - // let the trashbin handle this - if (\OCP\App::isEnabled('files_trashbin')) { + $relPath = Helper::stripUserFilesPath($path); + + // skip this method if the trash bin is enabled or if we delete a file + // outside of /data/user/files + if (\OCP\App::isEnabled('files_trashbin') || $relPath === false) { return true; } -- cgit v1.2.3