summaryrefslogtreecommitdiffstats
path: root/apps/files_encryption/lib
diff options
context:
space:
mode:
authorBjoern Schiessle <schiessle@owncloud.com>2013-12-16 12:16:07 +0100
committerBjoern Schiessle <schiessle@owncloud.com>2013-12-16 16:05:24 +0100
commitcdd816c930328f8ff721f9fa476184145eb3f41a (patch)
treecbbf10a01d76ff1a127861be442ae124131a4cca /apps/files_encryption/lib
parent6d489e0474b56930081ffd83838b8d1d6ec380ea (diff)
downloadnextcloud-server-cdd816c930328f8ff721f9fa476184145eb3f41a.tar.gz
nextcloud-server-cdd816c930328f8ff721f9fa476184145eb3f41a.zip
only remove encryption keys if a real file gets deleted, skip this method if a file outside of /data/user/files was deleted
Diffstat (limited to 'apps/files_encryption/lib')
-rw-r--r--apps/files_encryption/lib/proxy.php7
1 files changed, 5 insertions, 2 deletions
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;
}