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:
parent
3d0a7c49cc
commit
a6b661bd68
|
@ -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' => '',
|
||||||
|
|
Loading…
Reference in New Issue