summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/files/cache/cache.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/files/cache/cache.php b/lib/files/cache/cache.php
index 0617471079b..0e7a96aaca8 100644
--- a/lib/files/cache/cache.php
+++ b/lib/files/cache/cache.php
@@ -335,8 +335,8 @@ class Cache {
if ($sourceData['mimetype'] === 'httpd/unix-directory') {
//find all child entries
- $query = \OC_DB::prepare('SELECT `path`, `fileid` FROM `*PREFIX*filecache` WHERE `path` LIKE ?');
- $result = $query->execute(array($source . '/%'));
+ $query = \OC_DB::prepare('SELECT `path`, `fileid` FROM `*PREFIX*filecache` WHERE `storage` = ? AND `path` LIKE ?');
+ $result = $query->execute(array($this->getNumericStorageId(), $source . '/%'));
$childEntries = $result->fetchAll();
$sourceLength = strlen($source);
$query = \OC_DB::prepare('UPDATE `*PREFIX*filecache` SET `path` = ?, `path_hash` = ? WHERE `fileid` = ?');