|
|
@ -454,7 +454,7 @@ module ExportHelper
|
|
|
|
#单个文件的话,不需要压缩,只改名
|
|
|
|
#单个文件的话,不需要压缩,只改名
|
|
|
|
if homeworks_attach_path.size == 1
|
|
|
|
if homeworks_attach_path.size == 1
|
|
|
|
out_file = find_or_pack(object, work.user_id, digests.sort){
|
|
|
|
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
|
|
|
|
FileUtils.cp homeworks_attach_path.first, des_path
|
|
|
|
des_path
|
|
|
|
des_path
|
|
|
|
}
|
|
|
|
}
|
|
|
|