diff options
author | Bart Visscher <bartv@thisnet.nl> | 2012-06-15 16:04:01 +0200 |
---|---|---|
committer | Bart Visscher <bartv@thisnet.nl> | 2012-06-15 16:04:07 +0200 |
commit | 400769ab400f8c57b95d762420ff2b8da62738a3 (patch) | |
tree | d92aca54a7aa75e92a7837b6ff49bba0e697da15 /lib/connector/sabre/file.php | |
parent | 8f6121ffa8dfd5ee85ba70569587e2b1878084cd (diff) | |
download | nextcloud-server-400769ab400f8c57b95d762420ff2b8da62738a3.tar.gz nextcloud-server-400769ab400f8c57b95d762420ff2b8da62738a3.zip |
Optimize WebDav access using OC_FileCache
Diffstat (limited to 'lib/connector/sabre/file.php')
-rw-r--r-- | lib/connector/sabre/file.php | 7 |
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); |