Skip to content
Snippets Groups Projects
Commit ef4eaaee authored by Roeland Jago Douma's avatar Roeland Jago Douma Committed by GitHub
Browse files

Merge pull request #1346 from nextcloud/trash-detect-correct-mimetype

deleted files, fix mimetype detection
parents 341d4f0c 68b53669
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