From f6830e7462888f67549a8275826e1a14c0339711 Mon Sep 17 00:00:00 2001
From: Bjoern Schiessle <schiessle@owncloud.com>
Date: Tue, 27 Aug 2013 16:29:54 +0200
Subject: [PATCH] check shares for the real file and not for the .part file

---
 apps/files_encryption/lib/util.php | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/apps/files_encryption/lib/util.php b/apps/files_encryption/lib/util.php
index 62f82ce1a9..3922f7d9d7 100644
--- a/apps/files_encryption/lib/util.php
+++ b/apps/files_encryption/lib/util.php
@@ -1136,6 +1136,11 @@ class Util {
 		// Make sure that a share key is generated for the owner too
 		list($owner, $ownerPath) = $this->getUidAndFilename($filePath);
 
+		$pathinfo = pathinfo($ownerPath);
+		if(array_key_exists('extension', $pathinfo) && $pathinfo['extension'] === 'part') {
+			$ownerPath = $pathinfo['dirname'] . '/' . $pathinfo['filename'];
+		}
+
 		$userIds = array();
 		if ($sharingEnabled) {
 
-- 
GitLab