Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin Appelman <icewind@owncloud.com>2014-04-23 14:39:58 +0400
committerRobin Appelman <icewind@owncloud.com>2014-04-23 14:39:58 +0400
commit23e3752b8d4f84a9b23db67446c638305c5dd44a (patch)
tree3edf2fa8346ec0b8efd2c538587ec55d070628be /lib/connector
parentf48b0d9681977434c6a14c5dd0bd37b23f6ca3a8 (diff)
Backport of #8197 to stable6
Diffstat (limited to 'lib/connector')
-rw-r--r--lib/connector/sabre/file.php7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/connector/sabre/file.php b/lib/connector/sabre/file.php
index d3974be15a3..e90f86baa84 100644
--- a/lib/connector/sabre/file.php
+++ b/lib/connector/sabre/file.php
@@ -164,10 +164,11 @@ class OC_Connector_Sabre_File extends OC_Connector_Sabre_Node implements Sabre_D
*/
public function getContentType() {
if (isset($this->fileinfo_cache['mimetype'])) {
- return $this->fileinfo_cache['mimetype'];
+ $mimeType = $this->fileinfo_cache['mimetype'];
+ } else {
+ $mimeType = \OC\Files\Filesystem::getMimeType($this->path);
}
- return \OC\Files\Filesystem::getMimeType($this->path);
-
+ return \OC_Helper::getSecureMimeType($mimeType);
}
}