]> 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)
committerMichael Gapczynski <mtgap@owncloud.com>
Sat, 25 May 2013 18:19:11 +0000 (14:19 -0400)
lib/files/cache/cache.php

index 1d73cb9c7616ac64523e9d3e8db1d66b7b3c950b..5cc60da672c987633da34169f194393f6590557e 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` = ?');