summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorRobin Appelman <robin@icewind.nl>2016-12-13 12:10:44 +0100
committerRobin Appelman <robin@icewind.nl>2016-12-13 12:11:10 +0100
commit6f46a8bd5b38721874b44337f87c1435e60784e4 (patch)
treef905691d7a5075727bfa91c80d76e9f70e0df9b0 /lib
parent0c6c85bafbdc8ed1a05c990444cbdd353a7c62fe (diff)
downloadnextcloud-server-6f46a8bd5b38721874b44337f87c1435e60784e4.tar.gz
nextcloud-server-6f46a8bd5b38721874b44337f87c1435e60784e4.zip
also compare storage ids when checking for changed mounts
Signed-off-by: Robin Appelman <robin@icewind.nl>
Diffstat (limited to 'lib')
-rw-r--r--lib/private/Files/Config/UserMountCache.php7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/private/Files/Config/UserMountCache.php b/lib/private/Files/Config/UserMountCache.php
index c9a701d24b6..423eb5c423d 100644
--- a/lib/private/Files/Config/UserMountCache.php
+++ b/lib/private/Files/Config/UserMountCache.php
@@ -141,7 +141,11 @@ class UserMountCache implements IUserMountCache {
foreach ($cachedMounts as $cachedMount) {
if (
$newMount->getRootId() === $cachedMount->getRootId() &&
- ($newMount->getMountPoint() !== $cachedMount->getMountPoint() || $newMount->getMountId() !== $cachedMount->getMountId())
+ (
+ $newMount->getMountPoint() !== $cachedMount->getMountPoint() ||
+ $newMount->getStorageId() !== $cachedMount->getStorageId() ||
+ $newMount->getMountId() !== $cachedMount->getMountId()
+ )
) {
$changed[] = $newMount;
}
@@ -169,6 +173,7 @@ class UserMountCache implements IUserMountCache {
$builder = $this->connection->getQueryBuilder();
$query = $builder->update('mounts')
+ ->set('storage_id', $builder->createNamedParameter($mount->getStorageId()))
->set('mount_point', $builder->createNamedParameter($mount->getMountPoint()))
->set('mount_id', $builder->createNamedParameter($mount->getMountId(), IQueryBuilder::PARAM_INT))
->where($builder->expr()->eq('user_id', $builder->createNamedParameter($mount->getUser()->getUID())))