From 22968e806c9e71355875bc1e44908110c3960f79 Mon Sep 17 00:00:00 2001 From: Vincent Petry Date: Thu, 21 May 2015 10:57:58 +0200 Subject: Get correct mimetype when moving and changing extension Fixes issue when restoring folders from trash cross-storage, as such folders have an extension ".d12345678". Fixes issue when moving folders between storages and at the same time changing their extension. --- lib/private/files/cache/updater.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/private/files/cache/updater.php b/lib/private/files/cache/updater.php index 7df223eb037..193ddbedb2c 100644 --- a/lib/private/files/cache/updater.php +++ b/lib/private/files/cache/updater.php @@ -182,7 +182,7 @@ class Updater { if (pathinfo($sourceInternalPath, PATHINFO_EXTENSION) !== pathinfo($targetInternalPath, PATHINFO_EXTENSION)) { // handle mime type change - $mimeType = $sourceStorage->getMimeType($targetInternalPath); + $mimeType = $targetStorage->getMimeType($targetInternalPath); $fileId = $targetCache->getId($targetInternalPath); $targetCache->update($fileId, array('mimetype' => $mimeType)); } -- cgit v1.2.3