Skip to content

Commit

Permalink
detect the correct mimetype of the files in the trashbin, therefore w…
Browse files Browse the repository at this point in the history
…e have to check the filename without the appended timestamp
  • Loading branch information
schiessle committed Sep 9, 2016
1 parent f6c7b4e commit 68b5366
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions apps/files_trashbin/lib/Helper.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,11 +78,12 @@ public static function getTrashFiles($dir, $user, $sortAttribute = '', $sortDesc
$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' => '',
Expand Down

0 comments on commit 68b5366

Please sign in to comment.