summaryrefslogtreecommitdiffstats
path: root/lib/files/cache/upgrade.php
diff options
context:
space:
mode:
authorRobin Appelman <icewind@owncloud.com>2012-12-15 02:29:34 +0100
committerRobin Appelman <icewind@owncloud.com>2012-12-15 02:29:34 +0100
commitbc52f121626bb1bb1f67bc1f876d0420d153b3d1 (patch)
tree95f11da7ee7e6f319d33ae3fc8c619d2739d64b5 /lib/files/cache/upgrade.php
parentc6a5ce54a706efe6d157ec30a3960a3ebf8719a7 (diff)
downloadnextcloud-server-bc52f121626bb1bb1f67bc1f876d0420d153b3d1.tar.gz
nextcloud-server-bc52f121626bb1bb1f67bc1f876d0420d153b3d1.zip
dont insert and entry in the filecache during upgrade if the id already exists in the filecache
most likely the result from an incompelte upgrade
Diffstat (limited to 'lib/files/cache/upgrade.php')
-rw-r--r--lib/files/cache/upgrade.php6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/files/cache/upgrade.php b/lib/files/cache/upgrade.php
index ebac387de96..9219deebef5 100644
--- a/lib/files/cache/upgrade.php
+++ b/lib/files/cache/upgrade.php
@@ -29,7 +29,13 @@ class Upgrade {
return;
}
+ $checkExistingQuery = \OC_DB::prepare('SELECT `fileid` FROM `*PREFIX*filecache` WHERE `fileid` = ?');
+
while ($row = $oldEntriesResult->fetchRow()) {
+ if($checkExistingQuery->execute(array($row['id']))->fetchRow()){
+ continue;
+ }
+
list($storage, $internalPath) = \OC\Files\Filesystem::resolvePath($row['path']);
/**
* @var \OC\Files\Storage\Storage $storage