diff options
author | Bjoern Schiessle <schiessle@owncloud.com> | 2013-12-16 15:16:07 +0400 |
---|---|---|
committer | Bjoern Schiessle <schiessle@owncloud.com> | 2013-12-16 20:49:05 +0400 |
commit | 73a0b690e94a11a48f952076e4829f2f931533be (patch) | |
tree | 6fb9c3c5d97b0c8675b93e0f6af44483bfa18d96 /apps/files_encryption/lib | |
parent | bdb4890d04a57f65e6ec962516b875ec4513712a (diff) |
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.php | 7 |
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; } |