From 01fcc080bb5c280147d53bd6eee14655f5fefe87 Mon Sep 17 00:00:00 2001
From: Robin Appelman <icewind@owncloud.com>
Date: Sun, 26 Feb 2012 15:56:47 +0100
Subject: [PATCH] dont set the encryption flag for existing non-encrypted files

---
 apps/files_encryption/lib/proxy.php | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/apps/files_encryption/lib/proxy.php b/apps/files_encryption/lib/proxy.php
index bd98b98bba..c1c26d7754 100644
--- a/apps/files_encryption/lib/proxy.php
+++ b/apps/files_encryption/lib/proxy.php
@@ -107,10 +107,9 @@ class OC_FileProxy_Encryption extends OC_FileProxy{
 	}
 
 	public function postGetMimeType($path,$mime){
-		if((!OC_FileCache::inCache($path) and self::shouldEncrypt($path)) or self::isEncrypted($path)){
-			return OC_Helper::getMimeType('crypt://'.$path,'w');
-		}else{
-			return $mime;
+		if(self::isEncrypted($path)){
+			$mime=OC_Helper::getMimeType('crypt://'.$path,'w');
 		}
+		return $mime;
 	}
 }
-- 
GitLab