create a meanigful file name if files are from the root folder

This commit is contained in:
Björn Schießle 2013-03-07 14:24:18 +01:00
parent 3970d1f875
commit ce9942331e
1 changed files with 7 additions and 1 deletions

View File

@ -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);