diff options
author | Vincent Petry <pvince81@owncloud.com> | 2013-11-20 09:04:37 -0800 |
---|---|---|
committer | Vincent Petry <pvince81@owncloud.com> | 2013-11-20 09:04:37 -0800 |
commit | 5de5c317c1976a5b4fe5139f15cc875a72b1e5d7 (patch) | |
tree | d3d2bb9acbebde83448e735a4937f813717ce9fa /apps | |
parent | a88aec8a5c199a6a0304abe2d196a0f2f93d0a66 (diff) | |
parent | fe440248683fb74d758dd257272efcffb7e3c325 (diff) | |
download | nextcloud-server-5de5c317c1976a5b4fe5139f15cc875a72b1e5d7.tar.gz nextcloud-server-5de5c317c1976a5b4fe5139f15cc875a72b1e5d7.zip |
Merge pull request #5967 from owncloud/encryption-extstorage-fixsizereset
Fix for extstorage + encryption where unencrypted size is not kept
Diffstat (limited to 'apps')
-rw-r--r-- | apps/files_encryption/lib/proxy.php | 3 | ||||
-rw-r--r-- | apps/files_encryption/lib/stream.php | 3 |
2 files changed, 5 insertions, 1 deletions
diff --git a/apps/files_encryption/lib/proxy.php b/apps/files_encryption/lib/proxy.php index 54c3b9caa15..a8c74bd9dd4 100644 --- a/apps/files_encryption/lib/proxy.php +++ b/apps/files_encryption/lib/proxy.php @@ -349,7 +349,10 @@ class Proxy extends \OC_FileProxy { $fileInfo = false; // get file info from database/cache if not .part file if (!Helper::isPartialFilePath($path)) { + $proxyState = \OC_FileProxy::$enabled; + \OC_FileProxy::$enabled = false; $fileInfo = $view->getFileInfo($path); + \OC_FileProxy::$enabled = $proxyState; } // if file is encrypted return real file size diff --git a/apps/files_encryption/lib/stream.php b/apps/files_encryption/lib/stream.php index 206e3469023..1186a5f1d8d 100644 --- a/apps/files_encryption/lib/stream.php +++ b/apps/files_encryption/lib/stream.php @@ -491,7 +491,8 @@ class Stream { if ( $this->meta['mode'] !== 'r' && $this->meta['mode'] !== 'rb' && - $this->size > 0 + $this->size > 0 && + $this->unencryptedSize > 0 ) { // only write keyfiles if it was a new file |