diff options
author | Roeland Jago Douma <rullzer@users.noreply.github.com> | 2016-09-10 14:42:06 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-09-10 14:42:06 +0200 |
commit | ef4eaaee17bd5b70ef9e37c1025af58df81921e6 (patch) | |
tree | fae3e7f58a86c90342945aa7d33fa70c9bcfccd2 /apps | |
parent | 341d4f0c01bc29168a31e7bb16e4f09dea508f0f (diff) | |
parent | 68b53669c01bfa9e39384c81d69a126333b2e3fc (diff) | |
download | nextcloud-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.php | 5 |
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' => '', |