aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/files
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2015-12-17 17:07:48 +0100
committerMorris Jobke <hey@morrisjobke.de>2015-12-17 17:07:48 +0100
commitecdf88e41b898889fe8e05bb9c05415dd6b03a95 (patch)
tree735f9198dad871e9dd6459f4ccd5dc986937c594 /lib/private/files
parent3818a055b96a528263585b93f598fb479b5a1ec4 (diff)
downloadnextcloud-server-ecdf88e41b898889fe8e05bb9c05415dd6b03a95.tar.gz
nextcloud-server-ecdf88e41b898889fe8e05bb9c05415dd6b03a95.zip
Use proper public API for OC_Helper::getFileNameMimeType
Diffstat (limited to 'lib/private/files')
-rw-r--r--lib/private/files/objectstore/objectstorestorage.php2
-rw-r--r--lib/private/files/storage/common.php2
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/private/files/objectstore/objectstorestorage.php b/lib/private/files/objectstore/objectstorestorage.php
index 5ec05a3529e..a053ea6d6d2 100644
--- a/lib/private/files/objectstore/objectstorestorage.php
+++ b/lib/private/files/objectstore/objectstorestorage.php
@@ -329,7 +329,7 @@ class ObjectStoreStorage extends \OC\Files\Storage\Common {
$stat['mtime'] = $mtime;
$this->getCache()->update($stat['fileid'], $stat);
} else {
- $mimeType = \OC_Helper::getFileNameMimeType($path);
+ $mimeType = \OC::$server->getMimeTypeDetector()->detectPath($path);
// create new file
$stat = array(
'etag' => $this->getETag($path),
diff --git a/lib/private/files/storage/common.php b/lib/private/files/storage/common.php
index b06543d0a6a..091f2edb629 100644
--- a/lib/private/files/storage/common.php
+++ b/lib/private/files/storage/common.php
@@ -225,7 +225,7 @@ abstract class Common implements Storage {
if ($this->is_dir($path)) {
return 'httpd/unix-directory';
} elseif ($this->file_exists($path)) {
- return \OC_Helper::getFileNameMimeType($path);
+ return \OC::$server->getMimeTypeDetector()->detectPath($path);
} else {
return false;
}