mirror of
https://github.com/nextcloud/server.git
synced 2026-04-26 16:48:59 -04:00
fail gracefully when no old filecache is present during upgrade
This commit is contained in:
parent
dbbb357f62
commit
702444b242
1 changed files with 8 additions and 1 deletions
9
lib/files/cache/upgrade.php
vendored
9
lib/files/cache/upgrade.php
vendored
|
|
@ -16,7 +16,14 @@ class Upgrade {
|
|||
VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)');
|
||||
|
||||
$oldEntriesQuery = \OC_DB::prepare('SELECT * FROM `*PREFIX*fscache` ORDER BY `id` ASC'); //sort ascending to ensure the parent gets inserted before a child
|
||||
$oldEntriesResult = $oldEntriesQuery->execute();
|
||||
try{
|
||||
$oldEntriesResult = $oldEntriesQuery->execute();
|
||||
}catch(\Exception $e){
|
||||
return;
|
||||
}
|
||||
if(!$oldEntriesResult){
|
||||
return;
|
||||
}
|
||||
|
||||
while ($row = $oldEntriesResult->fetchRow()) {
|
||||
list($storage, $internalPath) = \OC\Files\Filesystem::resolvePath($row['path']);
|
||||
|
|
|
|||
Loading…
Reference in a new issue