Merge pull request #1201 from nextcloud/usermountcache-orphanedshare

[master] Usermountcache orphanedshare
This commit is contained in:
Roeland Jago Douma 2016-08-31 15:07:13 +02:00 committed by GitHub
commit a0af513a4a
2 changed files with 9 additions and 2 deletions

View File

@ -246,6 +246,12 @@ class SharedMount extends MountPoint implements MoveableMount {
->from('filecache')
->where($builder->expr()->eq('fileid', $builder->createNamedParameter($this->getStorageRootId())));
return $query->execute()->fetchColumn();
$result = $query->execute();
$row = $result->fetch();
$result->closeCursor();
if ($row) {
return $row['storage'];
}
return -1;
}
}

View File

@ -159,7 +159,8 @@ class UserMountCache implements IUserMountCache {
'mount_id' => $mount->getMountId()
], ['root_id', 'user_id']);
} else {
$this->logger->error('Error getting storage info for mount at ' . $mount->getMountPoint());
// in some cases this is legitimate, like orphaned shares
$this->logger->debug('Could not get storage info for mount at ' . $mount->getMountPoint());
}
}