Skip to content
Snippets Groups Projects
Commit 5de5c317 authored by Vincent Petry's avatar Vincent Petry
Browse files

Merge pull request #5967 from owncloud/encryption-extstorage-fixsizereset

Fix for extstorage + encryption where unencrypted size is not kept
parents a88aec8a fe440248
Branches
No related tags found
No related merge requests found
......@@ -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
......
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment