Skip to content
Snippets Groups Projects
Commit 78c60c25 authored by Thomas Müller's avatar Thomas Müller
Browse files

only perform files upgrade in case there are actually entries in the old fscache table

parent 1adadf36
No related branches found
No related tags found
No related merge requests found
......@@ -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;
}
/**
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment