diff --git a/route/v1/file.go b/route/v1/file.go index 1b33058..93670db 100644 --- a/route/v1/file.go +++ b/route/v1/file.go @@ -199,6 +199,7 @@ func GetDownloadFile(c *gin.Context) { defer ar.Close() commonDir := file.CommonPrefix(filepath.Separator, list...) + currentPath := filepath.Base(commonDir) name := "_" + currentPath diff --git a/service/notify.go b/service/notify.go index 9ffd197..6159f14 100644 --- a/service/notify.go +++ b/service/notify.go @@ -122,6 +122,7 @@ func (i *notifyServer) SendFileOperateNotify(nowSend bool) { } if temp.Finished || temp.ProcessedSize >= temp.TotalSize { + task.Finished = true task.Status = "FINISHED" FileQueue.Delete(v) @@ -187,6 +188,7 @@ func (i *notifyServer) SendFileOperateNotify(nowSend bool) { task.Status = "PROCESSING" } if temp.Finished || temp.ProcessedSize >= temp.TotalSize { + task.Finished = true task.Status = "FINISHED" FileQueue.Delete(v)