diff options
author | Thomas Müller <thomas.mueller@tmit.eu> | 2013-10-02 13:00:05 +0200 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2013-10-02 13:00:05 +0200 |
commit | 78c60c25c86e9e00d603e29113fae3eb2f8d1bc7 (patch) | |
tree | 3bc2551584e3a18c9951782e2ceadfea6a5c5dcf /lib | |
parent | 1adadf36fca29f7d688bcbf84ae53f6ecc16e53c (diff) | |
download | nextcloud-server-78c60c25c86e9e00d603e29113fae3eb2f8d1bc7.tar.gz nextcloud-server-78c60c25c86e9e00d603e29113fae3eb2f8d1bc7.zip |
only perform files upgrade in case there are actually entries in the old fscache table
Diffstat (limited to 'lib')
-rw-r--r-- | lib/private/files/cache/upgrade.php | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/lib/private/files/cache/upgrade.php b/lib/private/files/cache/upgrade.php index cfb9a117311..e3a46896cbf 100644 --- a/lib/private/files/cache/upgrade.php +++ b/lib/private/files/cache/upgrade.php @@ -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; } /** |