From d097328cfd38bacc40f800de3cdd2bd9e687850e Mon Sep 17 00:00:00 2001 From: qiyu-xie Date: Thu, 29 Jul 2021 09:31:37 +0800 Subject: [PATCH] * Modify download fail when batch load. --- module/file/control.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/module/file/control.php b/module/file/control.php index f031f7c2e9..0d723cda52 100644 --- a/module/file/control.php +++ b/module/file/control.php @@ -171,7 +171,7 @@ class file extends control $zipPath = $this->file->savePath . $zipName; if (!file_exists($zipName)) { - if($zip->open($zipPath, ZipArchive::OVERWRITE | ZipArchive::OVERWRITE) == true) + if($zip->open($zipPath, ZipArchive::OVERWRITE) == true) { foreach($files as $file) { @@ -179,11 +179,12 @@ class file extends control } $zip->close(); + $this->sendDownHeader($zipName, 'zip', $zipPath, 'file'); } else { - die(js::locate('Create failed!')); + die(js::error('Create failed!')); } } }