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
|
@ -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 New Issue