Skip to content
Snippets Groups Projects
Commit bcef775d authored by Arthur Schiwon's avatar Arthur Schiwon
Browse files

Overwrite Download-ZIP if it already exists. We do not want to show alien content.

parent 266699dd
No related merge requests found
......@@ -64,7 +64,7 @@ class OC_Files {
set_time_limit(0);
$zip = new ZipArchive();
$filename = get_temp_dir()."/ownCloud.zip";
if ($zip->open($filename, ZIPARCHIVE::CREATE)!==TRUE) {
if ($zip->open($filename, ZIPARCHIVE::CREATE | ZIPARCHIVE::OVERWRITE)!==TRUE) {
exit("cannot open <$filename>\n");
}
foreach($files as $file){
......@@ -85,7 +85,7 @@ class OC_Files {
set_time_limit(0);
$zip = new ZipArchive();
$filename = get_temp_dir()."/ownCloud.zip";
if ($zip->open($filename, ZIPARCHIVE::CREATE)!==TRUE) {
if ($zip->open($filename, ZIPARCHIVE::CREATE | ZIPARCHIVE::OVERWRITE)!==TRUE) {
exit("cannot open <$filename>\n");
}
$file=$dir.'/'.$files;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment