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
This commit is contained in:
Robin Appelman 2012-12-15 02:29:34 +01:00
parent c6a5ce54a7
commit bc52f12162
1 changed files with 6 additions and 0 deletions

View File

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