aboutsummaryrefslogtreecommitdiffstats
path: root/lib/connector/sabre/file.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/connector/sabre/file.php')
-rw-r--r--lib/connector/sabre/file.php7
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/connector/sabre/file.php b/lib/connector/sabre/file.php
index 3ba1b3355f2..dd25df78c29 100644
--- a/lib/connector/sabre/file.php
+++ b/lib/connector/sabre/file.php
@@ -63,8 +63,8 @@ class OC_Connector_Sabre_File extends OC_Connector_Sabre_Node implements Sabre_D
* @return int
*/
public function getSize() {
- $this->stat();
- return $this->stat_cache['size'];
+ $this->getFileinfoCache();
+ return $this->fileinfo_cache['size'];
}
@@ -92,6 +92,9 @@ class OC_Connector_Sabre_File extends OC_Connector_Sabre_Node implements Sabre_D
* @return mixed
*/
public function getContentType() {
+ if (isset($this->fileinfo_cache['mimetype'])) {
+ return $this->fileinfo_cache['mimetype'];
+ }
return OC_Filesystem::getMimeType($this->path);