diff options
Diffstat (limited to 'lib/private/files/cache/updater.php')
-rw-r--r-- | lib/private/files/cache/updater.php | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/private/files/cache/updater.php b/lib/private/files/cache/updater.php index d45c5e17fc8..9ef147aa157 100644 --- a/lib/private/files/cache/updater.php +++ b/lib/private/files/cache/updater.php @@ -86,6 +86,12 @@ class Updater { if ($storageFrom === $storageTo) { $cache = $storageFrom->getCache($internalFrom); $cache->move($internalFrom, $internalTo); + if (pathinfo($internalFrom, PATHINFO_EXTENSION) !== pathinfo($internalTo, PATHINFO_EXTENSION)) { + // redetect mime type change + $mimeType = $storageTo->getMimeType($internalTo); + $fileId = $storageTo->getCache()->getId($internalTo); + $storageTo->getCache()->update($fileId, array('mimetype' => $mimeType)); + } $cache->correctFolderSize($internalFrom); $cache->correctFolderSize($internalTo); self::correctFolder($from, time()); |