Prevent error with orphaned shares when updating user mount cache
This commit is contained in:
parent
fe3e7629e2
commit
c4f303d19c
|
@ -246,6 +246,11 @@ 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();
|
||||
if ($row) {
|
||||
return $row['storage'];
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue