From 1c961381035c391318fe681daf548fd8703b45d0 Mon Sep 17 00:00:00 2001 From: ychao_1983 Date: Thu, 23 Jun 2022 09:19:05 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- routers/repo/dataset.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/routers/repo/dataset.go b/routers/repo/dataset.go index 133262bf3..bb647fcbd 100755 --- a/routers/repo/dataset.go +++ b/routers/repo/dataset.go @@ -172,8 +172,8 @@ func DatasetIndex(ctx *context.Context) { for _, attachment := range pageAttachments { uploader, _ := models.GetUserByID(attachment.UploaderID) attachment.Uploader = uploader - if !strings.HasSuffix(attachment.Name, ".zip") { - attachment.DecompressState = -1 //非zip文件 + if !strings.HasSuffix(attachment.Name, ".zip") && !strings.HasSuffix(attachment.Name, ".tar.gz") { + attachment.DecompressState = -1 //非压缩文件 } }