Skip to content
Snippets Groups Projects
Unverified Commit 68b53669 authored by Bjoern Schiessle's avatar Bjoern Schiessle
Browse files

detect the correct mimetype of the files in the trashbin, therefore we have to...

detect the correct mimetype of the files in the trashbin, therefore we have to check the filename without the appended timestamp
parent f6c7b4e6
No related branches found
No related tags found
No related merge requests found
...@@ -78,11 +78,12 @@ class Helper { ...@@ -78,11 +78,12 @@ class Helper {
$originalPath = substr($originalPath, 0, -1); $originalPath = substr($originalPath, 0, -1);
} }
} }
$type = $entry->getMimeType() === ICacheEntry::DIRECTORY_MIMETYPE ? 'dir' : 'file';
$i = array( $i = array(
'name' => $name, 'name' => $name,
'mtime' => $timestamp, 'mtime' => $timestamp,
'mimetype' => $entry->getMimeType(), 'mimetype' => $type === 'dir' ? 'httpd/unix-directory' : \OC::$server->getMimeTypeDetector()->detectPath($name),
'type' => $entry->getMimeType() === ICacheEntry::DIRECTORY_MIMETYPE ? 'dir' : 'file', 'type' => $type,
'directory' => ($dir === '/') ? '' : $dir, 'directory' => ($dir === '/') ? '' : $dir,
'size' => $entry->getSize(), 'size' => $entry->getSize(),
'etag' => '', 'etag' => '',
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment