From bee48f851ee76cab2367f3f7add641a3a75845eb Mon Sep 17 00:00:00 2001 From: Bjoern Schiessle Date: Wed, 7 May 2014 11:47:27 +0200 Subject: [PATCH 1/2] ignore part files --- apps/files_sharing/lib/updater.php | 6 ++++++ 1 file changed, 6 insertions(+) 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); From 799d8ca381b95e3f6cc47aa5f42d73c3a4fbda92 Mon Sep 17 00:00:00 2001 From: Bjoern Schiessle Date: Wed, 7 May 2014 11:47:52 +0200 Subject: [PATCH 2/2] check if we have a fileinfo --- apps/files_sharing/lib/helper.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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); }