Skip to content
Snippets Groups Projects
Commit e43d02fa authored by Robin Appelman's avatar Robin Appelman
Browse files

fix encrypted flags not being saved correctly

parent 9ba467d6
No related branches found
No related tags found
No related merge requests found
......@@ -159,7 +159,7 @@ class OC_CryptStream{
public function stream_close(){
$this->flush();
if($this->meta['mode']!='r' and $this->meta['mode']!='rb'){
OC_FileCache::put($this->path,array('encrypted'=>true));
OC_FileCache::put($this->path,array('encrypted'=>true),'/');
}
return fclose($this->source);
}
......
......@@ -59,7 +59,7 @@ class OC_FileProxy_Encryption extends OC_FileProxy{
* @return bool
*/
private static function isEncrypted($path){
$metadata=OC_FileCache::getCached($path,'');
$metadata=OC_FileCache::getCached($path,'/');
return isset($metadata['encrypted']) and (bool)$metadata['encrypted'];
}
......@@ -67,7 +67,7 @@ class OC_FileProxy_Encryption extends OC_FileProxy{
if(self::shouldEncrypt($path)){
if (!is_resource($data)) {//stream put contents should have been converter to fopen
$data=OC_Crypt::blockEncrypt($data);
OC_FileCache::put($path,array('encrypted'=>true));
OC_FileCache::put($path,array('encrypted'=>true),'/');
}
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment