diff --git a/apps/files_encryption/lib/proxy.php b/apps/files_encryption/lib/proxy.php
index 55f2df783c466c367005eed8ec8432f43a9026af..a358a46a6e74445f332d39f8eac0bc282044de64 100644
--- a/apps/files_encryption/lib/proxy.php
+++ b/apps/files_encryption/lib/proxy.php
@@ -91,7 +91,6 @@ class Proxy extends \OC_FileProxy {
 	private function shouldEncrypt($path, $mode = 'w') {
 
 		$userId = Helper::getUser($path);
-		$session = new Session(new \OC\Files\View());
 
 		// don't call the crypt stream wrapper, if...
 		if (