From e43d02fadb25c7cfce8e57f542e27b458c147a30 Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Wed, 20 Jun 2012 20:18:26 +0200 Subject: [PATCH] fix encrypted flags not being saved correctly --- apps/files_encryption/lib/cryptstream.php | 2 +- apps/files_encryption/lib/proxy.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/files_encryption/lib/cryptstream.php b/apps/files_encryption/lib/cryptstream.php index 56331cbf601..c59a520a8d6 100644 --- a/apps/files_encryption/lib/cryptstream.php +++ b/apps/files_encryption/lib/cryptstream.php @@ -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); } diff --git a/apps/files_encryption/lib/proxy.php b/apps/files_encryption/lib/proxy.php index 9fd57c0f02b..052fff0bbb5 100644 --- a/apps/files_encryption/lib/proxy.php +++ b/apps/files_encryption/lib/proxy.php @@ -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),'/'); } } } -- 2.39.5