Add check if file is found in file cache

This commit is contained in:
Michael Gapczynski 2012-07-11 20:43:48 -04:00
parent ac395dced1
commit bdcfa4bb63
1 changed files with 4 additions and 0 deletions

View File

@ -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;