check if we are writing to user/files, otherwise skip encryption

This commit is contained in:
Bjoern Schiessle 2013-10-14 17:13:14 +02:00
parent e9ce704f17
commit d3af7a9aa4

View file

@ -47,7 +47,8 @@ class Proxy extends \OC_FileProxy {
*/
private static function shouldEncrypt($path) {
if (\OCP\App::isEnabled('files_encryption') === false || Crypt::mode() !== 'server') {
if (\OCP\App::isEnabled('files_encryption') === false || Crypt::mode() !== 'server' ||
strpos($path, '/' . \OCP\User::getUser() . '/files') !== 0) {
return false;
}