summaryrefslogtreecommitdiffstats
path: root/lib/private/files/cache
diff options
context:
space:
mode:
authorVincent Petry <pvince81@owncloud.com>2015-05-21 10:57:58 +0200
committerVincent Petry <pvince81@owncloud.com>2015-05-21 10:57:58 +0200
commit22968e806c9e71355875bc1e44908110c3960f79 (patch)
tree81841e5c5121e1eccc3db41c1909a252470715f4 /lib/private/files/cache
parent39d1e99228a22e232795b9800503697b866f5023 (diff)
downloadnextcloud-server-22968e806c9e71355875bc1e44908110c3960f79.tar.gz
nextcloud-server-22968e806c9e71355875bc1e44908110c3960f79.zip
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.
Diffstat (limited to 'lib/private/files/cache')
-rw-r--r--lib/private/files/cache/updater.php2
1 files changed, 1 insertions, 1 deletions
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));
}