summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorRoeland Jago Douma <rullzer@users.noreply.github.com>2016-09-10 14:42:06 +0200
committerGitHub <noreply@github.com>2016-09-10 14:42:06 +0200
commitef4eaaee17bd5b70ef9e37c1025af58df81921e6 (patch)
treefae3e7f58a86c90342945aa7d33fa70c9bcfccd2 /apps
parent341d4f0c01bc29168a31e7bb16e4f09dea508f0f (diff)
parent68b53669c01bfa9e39384c81d69a126333b2e3fc (diff)
downloadnextcloud-server-ef4eaaee17bd5b70ef9e37c1025af58df81921e6.tar.gz
nextcloud-server-ef4eaaee17bd5b70ef9e37c1025af58df81921e6.zip
Merge pull request #1346 from nextcloud/trash-detect-correct-mimetype
deleted files, fix mimetype detection
Diffstat (limited to 'apps')
-rw-r--r--apps/files_trashbin/lib/Helper.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/apps/files_trashbin/lib/Helper.php b/apps/files_trashbin/lib/Helper.php
index 836f799381a..9c312443164 100644
--- a/apps/files_trashbin/lib/Helper.php
+++ b/apps/files_trashbin/lib/Helper.php
@@ -78,11 +78,12 @@ class Helper {
$originalPath = substr($originalPath, 0, -1);
}
}
+ $type = $entry->getMimeType() === ICacheEntry::DIRECTORY_MIMETYPE ? 'dir' : 'file';
$i = array(
'name' => $name,
'mtime' => $timestamp,
- 'mimetype' => $entry->getMimeType(),
- 'type' => $entry->getMimeType() === ICacheEntry::DIRECTORY_MIMETYPE ? 'dir' : 'file',
+ 'mimetype' => $type === 'dir' ? 'httpd/unix-directory' : \OC::$server->getMimeTypeDetector()->detectPath($name),
+ 'type' => $type,
'directory' => ($dir === '/') ? '' : $dir,
'size' => $entry->getSize(),
'etag' => '',