diff options
author | Thomas Mueller <thomas.mueller@tmit.eu> | 2013-02-12 00:32:38 +0100 |
---|---|---|
committer | Thomas Mueller <thomas.mueller@tmit.eu> | 2013-02-12 00:32:38 +0100 |
commit | 76b31f870cf78aa8882761d954554fecb92e6211 (patch) | |
tree | 9c89430fe00983e94cc8864a12cd05242741d4c3 /lib/files/view.php | |
parent | 0c31c3cc3a928e8ca9272d32d68163c0700697ea (diff) | |
parent | fb23ac3ce2e0b3f002f036e55e516b672f088dc0 (diff) | |
download | nextcloud-server-76b31f870cf78aa8882761d954554fecb92e6211.tar.gz nextcloud-server-76b31f870cf78aa8882761d954554fecb92e6211.zip |
Merge branch 'master' into master-sqlserver
Diffstat (limited to 'lib/files/view.php')
-rw-r--r-- | lib/files/view.php | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/lib/files/view.php b/lib/files/view.php index dfcb770328b..1a234228eab 100644 --- a/lib/files/view.php +++ b/lib/files/view.php @@ -509,11 +509,7 @@ class View { if (Filesystem::isValidPath($path)) { $source = $this->fopen($path, 'r'); if ($source) { - $extension = ''; - $extOffset = strpos($path, '.'); - if ($extOffset !== false) { - $extension = substr($path, strrpos($path, '.')); - } + $extension = pathinfo($path, PATHINFO_EXTENSION); $tmpFile = \OC_Helper::tmpFile($extension); file_put_contents($tmpFile, $source); return $tmpFile; |