Merge pull request #5332 from owncloud/enc_run_proxy_only_for_files

check if we are writing to user/files, otherwise skip encryption
This commit is contained in:
Morris Jobke 2013-10-15 02:44:14 -07:00
commit 52501d6ba3
1 changed files with 2 additions and 1 deletions

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;
}