From 70ad9152707cfe4f2ead9f0badc117f199aefff6 Mon Sep 17 00:00:00 2001 From: cxt <853663049@qq.com> Date: Mon, 22 Jul 2019 20:18:47 +0800 Subject: [PATCH] tiaoz --- app/helpers/export_helper.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/helpers/export_helper.rb b/app/helpers/export_helper.rb index 9771f6e1d..742deb85b 100644 --- a/app/helpers/export_helper.rb +++ b/app/helpers/export_helper.rb @@ -454,7 +454,7 @@ module ExportHelper #单个文件的话,不需要压缩,只改名 if homeworks_attach_path.size == 1 out_file = find_or_pack(object, work.user_id, digests.sort){ - des_path = "#{OUTPUT_FOLDER}/#{make_zip_name(work, filename.first)}_#{work.id}}" + des_path = "#{OUTPUT_FOLDER}/#{make_zip_name(work, filename.first)}_#{File.basename(homeworks_attach_path.first)}" FileUtils.cp homeworks_attach_path.first, des_path des_path }