mirror of
https://github.com/nextcloud/server.git
synced 2026-06-27 01:20:37 -04:00
Fixing UPDATE error in filecache table when renaming files by calling move(). Add storage id to the where clause to avoid updating entries of other users.
This commit is contained in:
parent
d590064fdf
commit
2ea2abf11e
1 changed files with 2 additions and 2 deletions
4
lib/files/cache/cache.php
vendored
4
lib/files/cache/cache.php
vendored
|
|
@ -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` = ?');
|
||||
|
|
|
|||
Loading…
Reference in a new issue