summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
Diffstat (limited to 'apps')
-rw-r--r--apps/files/lib/app.php7
1 files changed, 5 insertions, 2 deletions
diff --git a/apps/files/lib/app.php b/apps/files/lib/app.php
index e04ac173d55..1ac266073db 100644
--- a/apps/files/lib/app.php
+++ b/apps/files/lib/app.php
@@ -83,14 +83,17 @@ class App {
else {
$meta['type'] = 'file';
}
+ // these need to be set for determineIcon()
+ $meta['isPreviewAvailable'] = \OC::$server->getPreviewManager()->isMimeSupported($meta['mimetype']);
+ $meta['directory'] = $dir;
$fileinfo = array(
'id' => $meta['fileid'],
'mime' => $meta['mimetype'],
'size' => $meta['size'],
'etag' => $meta['etag'],
- 'directory' => $dir,
+ 'directory' => $meta['directory'],
'name' => $newname,
- 'isPreviewAvailable' => \OC::$server->getPreviewManager()->isMimeSupported($meta['mimetype']),
+ 'isPreviewAvailable' => $meta['isPreviewAvailable'],
'icon' => \OCA\Files\Helper::determineIcon($meta)
);
$result['success'] = true;