Merge pull request #1566 from owncloud/fixing-1505-master
fixes zip download for folders containing a dot .....
This commit is contained in:
commit
2b0b6bb63c
|
@ -509,11 +509,7 @@ class View {
|
||||||
if (Filesystem::isValidPath($path)) {
|
if (Filesystem::isValidPath($path)) {
|
||||||
$source = $this->fopen($path, 'r');
|
$source = $this->fopen($path, 'r');
|
||||||
if ($source) {
|
if ($source) {
|
||||||
$extension = '';
|
$extension = pathinfo($path, PATHINFO_EXTENSION);
|
||||||
$extOffset = strpos($path, '.');
|
|
||||||
if ($extOffset !== false) {
|
|
||||||
$extension = substr($path, strrpos($path, '.'));
|
|
||||||
}
|
|
||||||
$tmpFile = \OC_Helper::tmpFile($extension);
|
$tmpFile = \OC_Helper::tmpFile($extension);
|
||||||
file_put_contents($tmpFile, $source);
|
file_put_contents($tmpFile, $source);
|
||||||
return $tmpFile;
|
return $tmpFile;
|
||||||
|
|
Loading…
Reference in New Issue