mirror of
https://github.com/nextcloud/server.git
synced 2026-06-13 18:50:47 -04:00
fix encrypted flags not being saved correctly
This commit is contained in:
parent
9ba467d629
commit
e43d02fadb
2 changed files with 3 additions and 3 deletions
|
|
@ -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),'/');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue