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>
(cherry picked from commit a256283)
  • Loading branch information
sealos-ci-robot authored and cuisongliu committed Sep 29, 2023
1 parent d4b20b2 commit b833ce3
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 b833ce3

Please sign in to comment.