diff --git a/apps/files_encryption/lib/util.php b/apps/files_encryption/lib/util.php
index 62f82ce1a969a3d7f9826dee65d7f656bf107747..3922f7d9d7f38eb4a9d435adedbbd1d112018667 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) {