diff options
author | Lukas Reschke <lukas@owncloud.com> | 2015-09-11 16:50:35 +0200 |
---|---|---|
committer | Lukas Reschke <lukas@owncloud.com> | 2015-09-11 16:50:35 +0200 |
commit | 0468a7dfd4379a2ab557a66d0b8ac2a01336f4ab (patch) | |
tree | 9a8646c73b5c4a15045579d943750376ae44c5c1 /lib/private/files | |
parent | 437882c2841026d890a24741b3a32e3ba2f88f78 (diff) | |
parent | 188d0e09b857e607b57b7686e95bbf0502359c2b (diff) | |
download | nextcloud-server-0468a7dfd4379a2ab557a66d0b8ac2a01336f4ab.tar.gz nextcloud-server-0468a7dfd4379a2ab557a66d0b8ac2a01336f4ab.zip |
Merge pull request #18977 from owncloud/fix-mimetype-reset
Add reset method to mimetype loader
Diffstat (limited to 'lib/private/files')
-rw-r--r-- | lib/private/files/cache/scanner.php | 2 | ||||
-rw-r--r-- | lib/private/files/type/loader.php | 8 |
2 files changed, 9 insertions, 1 deletions
diff --git a/lib/private/files/cache/scanner.php b/lib/private/files/cache/scanner.php index f76ef5ba0dd..fb60ee5aa53 100644 --- a/lib/private/files/cache/scanner.php +++ b/lib/private/files/cache/scanner.php @@ -377,7 +377,7 @@ class Scanner extends BasicEmitter { // inserted mimetypes but those weren't available yet inside the transaction // To make sure to have the updated mime types in such cases, // we reload them here - $this->cache->loadMimetypes(); + \OC::$server->getMimeTypeLoader()->reset(); } foreach ($childQueue as $child => $childData) { diff --git a/lib/private/files/type/loader.php b/lib/private/files/type/loader.php index df893306615..78bfcf60bff 100644 --- a/lib/private/files/type/loader.php +++ b/lib/private/files/type/loader.php @@ -97,6 +97,14 @@ class Loader implements IMimeTypeLoader { } /** + * Clear all loaded mimetypes, allow for re-loading + */ + public function reset() { + $this->mimetypes = []; + $this->mimetypeIds = []; + } + + /** * Store a mimetype in the DB * * @param string $mimetype |