From 78479f9604b7731979008b9d85db5840555f036d Mon Sep 17 00:00:00 2001 From: "a624669980@163.com" Date: Thu, 16 Jun 2022 16:57:13 +0800 Subject: [PATCH] Update file.go --- service/file.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/service/file.go b/service/file.go index 697dd14..9b14b70 100644 --- a/service/file.go +++ b/service/file.go @@ -2,7 +2,7 @@ * @Author: LinkLeong link@icewhale.com * @Date: 2021-12-20 14:15:46 * @LastEditors: LinkLeong - * @LastEditTime: 2022-06-09 18:15:54 + * @LastEditTime: 2022-06-16 16:47:46 * @FilePath: /CasaOS/service/file.go * @Description: * @Website: https://www.casaos.io @@ -93,13 +93,12 @@ func FileOperate(k string) { v := temp.Item[i] if temp.Type == "move" { lastPath := v.From[strings.LastIndex(v.From, "/")+1:] - if !file.CheckNotExist(temp.To + "/" + lastPath) { if temp.Style == "skip" { temp.Item[i].Finished = true continue } else { - os.Remove(temp.To + "/" + lastPath) + os.RemoveAll(temp.To + "/" + lastPath) } }