diff options
author | Vincent Petry <pvince81@owncloud.com> | 2014-05-07 14:31:28 +0200 |
---|---|---|
committer | Vincent Petry <pvince81@owncloud.com> | 2014-05-07 14:31:28 +0200 |
commit | a8c83f79efdd1639895c4a7edee2893b0aff776d (patch) | |
tree | eea1b49e4f497387ce93d7a861aa38417a846985 | |
parent | 283b483100c21df143e7f432551f5f5264b8ee55 (diff) | |
parent | 799d8ca381b95e3f6cc47aa5f42d73c3a4fbda92 (diff) | |
download | nextcloud-server-a8c83f79efdd1639895c4a7edee2893b0aff776d.tar.gz nextcloud-server-a8c83f79efdd1639895c4a7edee2893b0aff776d.zip |
Merge pull request #8489 from owncloud/share_updater_ignore_part_files
[sharing] share updater ignore part files
-rw-r--r-- | apps/files_sharing/lib/helper.php | 6 | ||||
-rw-r--r-- | apps/files_sharing/lib/updater.php | 6 |
2 files changed, 11 insertions, 1 deletions
diff --git a/apps/files_sharing/lib/helper.php b/apps/files_sharing/lib/helper.php index cc1f7d9ffdf..c7347539fcc 100644 --- a/apps/files_sharing/lib/helper.php +++ b/apps/files_sharing/lib/helper.php @@ -127,7 +127,11 @@ class Helper { $ids = array(); while ($path !== '' && $path !== '.' && $path !== '/') { $info = $ownerView->getFileInfo($path); - $ids[] = $info['fileid']; + if ($info instanceof \OC\Files\FileInfo) { + $ids[] = $info['fileid']; + } else { + \OCP\Util::writeLog('sharing', 'No fileinfo available for: ' . $path, \OCP\Util::WARN); + } $path = dirname($path); } diff --git a/apps/files_sharing/lib/updater.php b/apps/files_sharing/lib/updater.php index f7c0a75aeeb..249211c306d 100644 --- a/apps/files_sharing/lib/updater.php +++ b/apps/files_sharing/lib/updater.php @@ -55,6 +55,12 @@ class Shared_Updater { * @param string $target */ static public function correctFolders($target) { + + // ignore part files + if (pathinfo($target, PATHINFO_EXTENSION) === 'part') { + return false; + } + // Correct Shared folders of other users shared with $shares = \OCA\Files_Sharing\Helper::getSharesFromItem($target); |