Skip to content

Commit

Permalink
fix: skip same path (#3898)
Browse files Browse the repository at this point in the history
  • Loading branch information
ghostloda authored and sealos-ci-robot@sealos.io committed Sep 11, 2023
1 parent 8c2edf2 commit f5425f0
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pkg/utils/file/file_v2.go
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,9 @@ func WriteFile(fileName string, content []byte) error {

// RecursionCopy equals to `cp -r`
func RecursionCopy(src, dst string) error {
if src == dst {
return nil
}
if IsDir(src) {
return CopyDirV3(src, dst)
}
Expand Down

0 comments on commit f5425f0

Please sign in to comment.