Browse Source

detect the correct mimetype of the files in the trashbin, therefore we have to check the filename without the appended timestamp

tags/v11.0RC2
Bjoern Schiessle 7 years ago
parent
commit
68b53669c0
No account linked to committer's email address
1 changed files with 3 additions and 2 deletions
  1. 3
    2
      apps/files_trashbin/lib/Helper.php

+ 3
- 2
apps/files_trashbin/lib/Helper.php View File

@@ -78,11 +78,12 @@ class Helper {
$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' => '',

Loading…
Cancel
Save