mirror of
https://github.com/nextcloud/server.git
synced 2026-05-28 04:32:30 -04:00
only perform files upgrade in case there are actually entries in the old fscache table
This commit is contained in:
parent
1adadf36fc
commit
78c60c25c8
1 changed files with 9 additions and 1 deletions
10
lib/private/files/cache/upgrade.php
vendored
10
lib/private/files/cache/upgrade.php
vendored
|
|
@ -192,7 +192,15 @@ class Upgrade {
|
|||
*/
|
||||
static function needUpgrade($user) {
|
||||
$cacheVersion = (int)\OCP\Config::getUserValue($user, 'files', 'cache_version', 4);
|
||||
return $cacheVersion < 5;
|
||||
if ($cacheVersion < 5) {
|
||||
$legacy = new \OC\Files\Cache\Legacy($user);
|
||||
if ($legacy->hasItems()) {
|
||||
return true;
|
||||
}
|
||||
self::upgradeDone($user);
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Reference in a new issue