]> source.dussan.org Git - nextcloud-server.git/commitdiff
check shares for the real file and not for the .part file
authorBjoern Schiessle <schiessle@owncloud.com>
Tue, 27 Aug 2013 14:29:54 +0000 (16:29 +0200)
committerBjoern Schiessle <schiessle@owncloud.com>
Fri, 6 Sep 2013 14:05:11 +0000 (16:05 +0200)
apps/files_encryption/lib/util.php

index 62f82ce1a969a3d7f9826dee65d7f656bf107747..3922f7d9d7f38eb4a9d435adedbbd1d112018667 100644 (file)
@@ -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) {