diff options
author | Björn Schießle <schiessle@owncloud.com> | 2013-03-07 17:24:18 +0400 |
---|---|---|
committer | Björn Schießle <schiessle@owncloud.com> | 2013-03-07 17:24:18 +0400 |
commit | ce9942331eb09b5e1ae6f38791776625f6663419 (patch) | |
tree | f9ef1bf8d985dc64edc3a526b48dbdf507b70e19 /lib | |
parent | 3970d1f8750132f73cac4653c9943995ebbb28ae (diff) |
create a meanigful file name if files are from the root folder
Diffstat (limited to 'lib')
-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); |