check if we have a fileinfo

This commit is contained in:
Bjoern Schiessle 2014-05-07 11:47:52 +02:00
parent bee48f851e
commit 799d8ca381
1 changed files with 5 additions and 1 deletions

View File

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