summaryrefslogtreecommitdiffstats
path: root/lib/files
diff options
context:
space:
mode:
authorThomas Müller <thomas.mueller@tmit.eu>2013-02-09 08:33:44 -0800
committerThomas Müller <thomas.mueller@tmit.eu>2013-02-09 08:33:44 -0800
commit2b0b6bb63c5c9e2fc3900fa7bf5b127ec2ae3a68 (patch)
tree05c2c4464ff0ef3dc099bcd21e96df9d5a2638f0 /lib/files
parent5a309c11ca90589303c38084795432d3d23e393d (diff)
parentddc7af9a53fb78a363c21043ab0e2e1a80b48750 (diff)
downloadnextcloud-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.php6
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;