diff options
author | Roland Hager <roland.hager@tu-berlin.de> | 2013-05-16 17:18:07 +0200 |
---|---|---|
committer | Roland Hager <roland.hager@tu-berlin.de> | 2013-05-22 08:18:57 +0200 |
commit | 2ea2abf11e31904db187dfe9975cc34247fde1d7 (patch) | |
tree | a6e4b7e6c615c30b5d93ffda514f55ba397a4c4a /lib/files | |
parent | d590064fdfb8f46c64ebd0b54cd3b7acd8c9fc78 (diff) | |
download | nextcloud-server-2ea2abf11e31904db187dfe9975cc34247fde1d7.tar.gz nextcloud-server-2ea2abf11e31904db187dfe9975cc34247fde1d7.zip |
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.
Diffstat (limited to 'lib/files')
-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 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` = ?'); |