summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorRoeland Jago Douma <rullzer@users.noreply.github.com>2016-08-31 15:07:13 +0200
committerGitHub <noreply@github.com>2016-08-31 15:07:13 +0200
commita0af513a4a4adc295f5673fd7d1d7fd25c6ac75a (patch)
treee1587c68dee5e6bc2b58bacb39f1ea46455ebc23 /apps
parente4311a2ebdf3eeda8b2f1022c19290dc68db8ae5 (diff)
parent423378ea179574c6c9c272f785e94a4bdfc996bb (diff)
downloadnextcloud-server-a0af513a4a4adc295f5673fd7d1d7fd25c6ac75a.tar.gz
nextcloud-server-a0af513a4a4adc295f5673fd7d1d7fd25c6ac75a.zip
Merge pull request #1201 from nextcloud/usermountcache-orphanedshare
[master] Usermountcache orphanedshare
Diffstat (limited to 'apps')
-rw-r--r--apps/files_sharing/lib/SharedMount.php8
1 files changed, 7 insertions, 1 deletions
diff --git a/apps/files_sharing/lib/SharedMount.php b/apps/files_sharing/lib/SharedMount.php
index 2b562c4b4f1..13ecd88bfa9 100644
--- a/apps/files_sharing/lib/SharedMount.php
+++ b/apps/files_sharing/lib/SharedMount.php
@@ -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;
}
}