Skip to content

Commit

Permalink
fix: skip same path (labring#3898) (labring#3899)
Browse files Browse the repository at this point in the history
Co-authored-by: 榴莲榴莲 <78798447@qq.com>
  • Loading branch information
sealos-ci-robot and ghostloda committed Sep 11, 2023
1 parent 8c2edf2 commit a256283
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 a256283

Please sign in to comment.