diff options
author | Michael Gapczynski <mtgap@owncloud.com> | 2013-05-25 11:18:20 -0700 |
---|---|---|
committer | Michael Gapczynski <mtgap@owncloud.com> | 2013-05-25 11:18:20 -0700 |
commit | 0fdf3a7e635936ac0b5e66c215d1666fac5f5c32 (patch) | |
tree | 6fa9815c4a67762ea3cf1deed5c6ebdd4cfbdfce /lib | |
parent | c870aed1b66a4f0a2ad6fbe9fbd8d2e35d6f9b40 (diff) | |
parent | 5c112657b23e546b0ef31ebff11f48a0e2e2c6fc (diff) | |
download | nextcloud-server-0fdf3a7e635936ac0b5e66c215d1666fac5f5c32.tar.gz nextcloud-server-0fdf3a7e635936ac0b5e66c215d1666fac5f5c32.zip |
Merge pull request #3388 from roha4000/master
Duplicate DB entries in filecache table when renaming folder in WebUI #2
Diffstat (limited to 'lib')
-rw-r--r-- | lib/files/cache/cache.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/files/cache/cache.php b/lib/files/cache/cache.php index b912b4423e7..0210d5a73f1 100644 --- a/lib/files/cache/cache.php +++ b/lib/files/cache/cache.php @@ -340,8 +340,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` = ?'); |