detect the correct mimetype of the files in the trashbin, therefore we have to check the filename without the appended timestamp

This commit is contained in:
Bjoern Schiessle 2016-09-09 15:22:19 +02:00
parent 3d0a7c49cc
commit a6b661bd68
No known key found for this signature in database
GPG Key ID: 2378A753E2BF04F6
1 changed files with 3 additions and 2 deletions

View File

@ -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' => '',