diff --git a/apps/files_encryption/lib/stream.php b/apps/files_encryption/lib/stream.php
index 3149b460b629170ea9a78e55c95bce3b44e1ddb9..db7d2ad61739ae3ab83b8d03abac1d222e5a94e5 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;