Skip to content

Commit

Permalink
Update file.go
Browse files Browse the repository at this point in the history
  • Loading branch information
LinkLeong committed Jun 16, 2022
1 parent 8fe8938 commit 78479f9
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions service/file.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* @Author: LinkLeong [email protected]
* @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
Expand Down Expand Up @@ -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)
}
}

Expand Down

0 comments on commit 78479f9

Please sign in to comment.