Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVincent Petry <pvince81@owncloud.com>2013-11-20 21:04:37 +0400
committerVincent Petry <pvince81@owncloud.com>2013-11-20 21:04:37 +0400
commit5de5c317c1976a5b4fe5139f15cc875a72b1e5d7 (patch)
treed3d2bb9acbebde83448e735a4937f813717ce9fa
parenta88aec8a5c199a6a0304abe2d196a0f2f93d0a66 (diff)
parentfe440248683fb74d758dd257272efcffb7e3c325 (diff)
Merge pull request #5967 from owncloud/encryption-extstorage-fixsizereset
Fix for extstorage + encryption where unencrypted size is not kept
-rw-r--r--apps/files_encryption/lib/proxy.php3
-rw-r--r--apps/files_encryption/lib/stream.php3
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