diff options
author | Robin Appelman <icewind@owncloud.com> | 2012-02-15 16:23:00 +0100 |
---|---|---|
committer | Robin Appelman <icewind@owncloud.com> | 2012-02-21 20:48:48 +0100 |
commit | c121a1a1e7d9ae554005b8438d8ad999cdacc601 (patch) | |
tree | ba22ce84a3eff604e856d4b626a084b47363ba6e /apps/files_encryption | |
parent | 6a8364c3ffeb9d6227f141ae77ba317a1afbfdf6 (diff) | |
download | nextcloud-server-c121a1a1e7d9ae554005b8438d8ad999cdacc601.tar.gz nextcloud-server-c121a1a1e7d9ae554005b8438d8ad999cdacc601.zip |
implement file_put_contents with stream data using fopen
Diffstat (limited to 'apps/files_encryption')
-rw-r--r-- | apps/files_encryption/lib/proxy.php | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/apps/files_encryption/lib/proxy.php b/apps/files_encryption/lib/proxy.php index be6ffa4f44d..7974d68d487 100644 --- a/apps/files_encryption/lib/proxy.php +++ b/apps/files_encryption/lib/proxy.php @@ -70,11 +70,7 @@ class OC_FileProxy_Encryption extends OC_FileProxy{ public function preFile_put_contents($path,&$data){ if(self::shouldEncrypt($path)){ - if (is_resource($data)) { - $id=md5($path); - OC_CryptStream::$sourceStreams[$id]=array('path'=>$path,'stream'=>$data); - $data=fopen('crypt://streams/'.$id,'r'); - }else{ + if (!is_resource($data)) {//stream put contents should have been converter to fopen $data=OC_Crypt::blockEncrypt($data); } } |