diff options
author | Arthur Schiwon <blizzz@owncloud.com> | 2012-03-27 01:18:38 +0200 |
---|---|---|
committer | Arthur Schiwon <blizzz@owncloud.com> | 2012-03-27 01:18:38 +0200 |
commit | bcef775d6bc93144316d4eea74f90c5be03576b0 (patch) | |
tree | 11c7510916c75501c886c2898a6c36058a00b49c /lib/files.php | |
parent | 266699ddf90a074aa4c4f5b50a63f5f430842bde (diff) | |
download | nextcloud-server-bcef775d6bc93144316d4eea74f90c5be03576b0.tar.gz nextcloud-server-bcef775d6bc93144316d4eea74f90c5be03576b0.zip |
Overwrite Download-ZIP if it already exists. We do not want to show alien content.
Diffstat (limited to 'lib/files.php')
-rw-r--r-- | lib/files.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/files.php b/lib/files.php index 57ebb9005ad..f1cf7573bae 100644 --- a/lib/files.php +++ b/lib/files.php @@ -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; |