Skip to content

Commit

Permalink
Merge pull request #1346 from nextcloud/trash-detect-correct-mimetype
Browse files Browse the repository at this point in the history
deleted files, fix mimetype detection
  • Loading branch information
rullzer committed Sep 10, 2016
2 parents 341d4f0 + 68b5366 commit ef4eaae
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 ef4eaae

Please sign in to comment.