]> source.dussan.org Git - nextcloud-server.git/commitdiff
Fixing UPDATE error in filecache table when renaming files by calling move(). Add...
authorRoland Hager <roland.hager@tu-berlin.de>
Thu, 16 May 2013 15:18:07 +0000 (17:18 +0200)
committerRoland Hager <roland.hager@tu-berlin.de>
Wed, 22 May 2013 06:18:57 +0000 (08:18 +0200)
lib/files/cache/cache.php

index 0617471079b789fe53cfdfa380c70ac8b4a73ea8..0e7a96aaca84cb5f2630ab3a6f85cfce39e610e9 100644 (file)
@@ -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` = ?');