diff options
author | Thomas Müller <thomas.mueller@tmit.eu> | 2013-02-09 08:33:44 -0800 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2013-02-09 08:33:44 -0800 |
commit | 2b0b6bb63c5c9e2fc3900fa7bf5b127ec2ae3a68 (patch) | |
tree | 05c2c4464ff0ef3dc099bcd21e96df9d5a2638f0 /lib/files | |
parent | 5a309c11ca90589303c38084795432d3d23e393d (diff) | |
parent | ddc7af9a53fb78a363c21043ab0e2e1a80b48750 (diff) | |
download | nextcloud-server-2b0b6bb63c5c9e2fc3900fa7bf5b127ec2ae3a68.tar.gz nextcloud-server-2b0b6bb63c5c9e2fc3900fa7bf5b127ec2ae3a68.zip |
Merge pull request #1566 from owncloud/fixing-1505-master
fixes zip download for folders containing a dot .....
Diffstat (limited to 'lib/files')
-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; |