diff options
author | Björn Schießle <schiessle@owncloud.com> | 2013-03-07 14:24:18 +0100 |
---|---|---|
committer | Björn Schießle <schiessle@owncloud.com> | 2013-03-07 14:24:18 +0100 |
commit | ce9942331eb09b5e1ae6f38791776625f6663419 (patch) | |
tree | f9ef1bf8d985dc64edc3a526b48dbdf507b70e19 | |
parent | 3970d1f8750132f73cac4653c9943995ebbb28ae (diff) | |
download | nextcloud-server-ce9942331eb09b5e1ae6f38791776625f6663419.tar.gz nextcloud-server-ce9942331eb09b5e1ae6f38791776625f6663419.zip |
create a meanigful file name if files are from the root folder
-rw-r--r-- | lib/files.php | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/files.php b/lib/files.php index ae3144de2c5..447ffb50577 100644 --- a/lib/files.php +++ b/lib/files.php @@ -78,7 +78,13 @@ class OC_Files { } } $zip->close(); - $name = basename($dir) . '.zip'; + $basename = basename($dir); + if ($basename) { + $name = $basename . '.zip'; + } else { + $name = 'owncloud.zip'; + } + set_time_limit($executionTime); } elseif (\OC\Files\Filesystem::is_dir($dir . '/' . $files)) { self::validateZipDownload($dir, $files); |