From 84c56a5d56eddfb9e5d0356575902253eb266da1 Mon Sep 17 00:00:00 2001
From: Florin Peter <github@florin-peter.de>
Date: Tue, 14 May 2013 21:29:24 +0200
Subject: [PATCH] fix for zero size files

---
 apps/files_encryption/lib/stream.php | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/apps/files_encryption/lib/stream.php b/apps/files_encryption/lib/stream.php
index 3149b460b6..db7d2ad617 100644
--- a/apps/files_encryption/lib/stream.php
+++ b/apps/files_encryption/lib/stream.php
@@ -477,9 +477,9 @@ class Stream {
 		
 		if ( 
 		$this->meta['mode']!='r' 
-		and $this->meta['mode']!='rb' 
+		and $this->meta['mode']!='rb'
+        and $this->size > 0
 		) {
-
             // Disable encryption proxy to prevent recursive calls
             $proxyStatus = \OC_FileProxy::$enabled;
             \OC_FileProxy::$enabled = false;
-- 
GitLab