Update path.go (#2023)

pull/2032/head
songzhibin97 3 years ago committed by GitHub
parent bbb96f1e1f
commit ec2e3ab24e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 12
      cmd/kratos/internal/base/path.go

@ -79,14 +79,14 @@ func copyDir(src, dst string, replaces, ignores []string) error {
} }
srcfp := path.Join(src, fd.Name()) srcfp := path.Join(src, fd.Name())
dstfp := path.Join(dst, fd.Name()) dstfp := path.Join(dst, fd.Name())
var e error
if fd.IsDir() { if fd.IsDir() {
if err = copyDir(srcfp, dstfp, replaces, ignores); err != nil { e = copyDir(srcfp, dstfp, replaces, ignores)
return err
}
} else { } else {
if err = copyFile(srcfp, dstfp, replaces); err != nil { e = copyFile(srcfp, dstfp, replaces)
return err }
} if e != nil {
return e
} }
} }
return nil return nil

Loading…
Cancel
Save