diff options
author | Vincent Petry <pvince81@owncloud.com> | 2014-02-19 14:33:24 +0100 |
---|---|---|
committer | Vincent Petry <pvince81@owncloud.com> | 2014-02-19 14:33:24 +0100 |
commit | 952584e9c782d196eb2bcd6df1e3ecdf21adcb55 (patch) | |
tree | 7900602434f86a503b800f63ceb0a6a7b4499964 /lib/private | |
parent | f9d4780d27ca21d86d8dacf73eda52a73a479d61 (diff) | |
parent | 94b3296a71c5950f70919836bc12f0066016b705 (diff) | |
download | nextcloud-server-952584e9c782d196eb2bcd6df1e3ecdf21adcb55.tar.gz nextcloud-server-952584e9c782d196eb2bcd6df1e3ecdf21adcb55.zip |
Merge pull request #7195 from owncloud/files-selectall
Do not send file list for select all on Download/delete
Diffstat (limited to 'lib/private')
-rw-r--r-- | lib/private/files.php | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/lib/private/files.php b/lib/private/files.php index 6a6916537d4..656d6f044ca 100644 --- a/lib/private/files.php +++ b/lib/private/files.php @@ -106,7 +106,12 @@ class OC_Files { if ($xsendfile) { $filename = OC_Helper::moveToNoClean($filename); } - $name = $files . '.zip'; + // downloading root ? + if ($files === '') { + $name = 'download.zip'; + } else { + $name = $files . '.zip'; + } set_time_limit($executionTime); } else { $zip = false; @@ -208,6 +213,8 @@ class OC_Files { $dirname=basename($dir); $zip->addEmptyDir($internalDir.$dirname); $internalDir.=$dirname.='/'; + // prevent absolute dirs + $internalDir = ltrim($internalDir, '/'); $files=OC_Files::getDirectoryContent($dir); foreach($files as $file) { $filename=$file['name']; |