From bdcfa4bb63800093ad47520c9874fb837f9bf2e9 Mon Sep 17 00:00:00 2001 From: Michael Gapczynski Date: Wed, 11 Jul 2012 20:43:48 -0400 Subject: [PATCH] Add check if file is found in file cache --- lib/public/share.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/public/share.php b/lib/public/share.php index 61014c6160e..7356714219a 100644 --- a/lib/public/share.php +++ b/lib/public/share.php @@ -562,6 +562,10 @@ class Share { } else if (is_array($source)) { $itemSource = $source['item']; $fileSource = \OC_FileCache::getId($source['file']); + if ($fileSource == -1) { + \OC_Log::write('OCP\Share', 'Sharing '.$item.' failed, because the file could not be found in the file cache', \OC_Log::ERROR); + return false; + } } else { $itemSource = $source; $fileSource = null;