diff options
author | Andreas Fischer <bantu@owncloud.com> | 2013-10-29 12:54:30 +0100 |
---|---|---|
committer | Andreas Fischer <bantu@owncloud.com> | 2013-10-29 12:54:30 +0100 |
commit | a04a01d51f6d9dc9ebc346676048e5988ea1beac (patch) | |
tree | 9b39ccf4175ff02449cf6e232234d73c8417f185 | |
parent | b0b76fe064860d2074c91897a29e0f9ac5705db8 (diff) | |
download | nextcloud-server-a04a01d51f6d9dc9ebc346676048e5988ea1beac.tar.gz nextcloud-server-a04a01d51f6d9dc9ebc346676048e5988ea1beac.zip |
Do not calculate $isWrapped if not needed.
-rw-r--r-- | lib/private/files/type/detection.php | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/private/files/type/detection.php b/lib/private/files/type/detection.php index 242a81cb5a4..d8a83382822 100644 --- a/lib/private/files/type/detection.php +++ b/lib/private/files/type/detection.php @@ -61,8 +61,6 @@ class Detection { * @return string */ public function detect($path) { - $isWrapped = (strpos($path, '://') !== false) and (substr($path, 0, 7) === 'file://'); - if (@is_dir($path)) { // directories are easy return "httpd/unix-directory"; @@ -79,6 +77,7 @@ class Detection { } finfo_close($finfo); } + $isWrapped = (strpos($path, '://') !== false) and (substr($path, 0, 7) === 'file://'); if (!$isWrapped and $mimeType === 'application/octet-stream' && function_exists("mime_content_type")) { // use mime magic extension if available $mimeType = mime_content_type($path); |