Improve error message for failed file copied (#30418)

Этот коммит содержится в:
Ben Schumacher
2025-03-19 19:48:26 +01:00
коммит произвёл GitHub
родитель d7d8b4163e
Коммит 2e44a6a1ed

Просмотреть файл

@@ -59,8 +59,14 @@ func CopyFile(src, dst string) (err error) {
// src must exist and dst must not exist.
// Permissions are preserved when possible. Symlinks are skipped.
func CopyDir(src string, dst string) (err error) {
src = filepath.Clean(src)
dst = filepath.Clean(dst)
src, err = filepath.Abs(src)
if err != nil {
return
}
dst, err = filepath.Abs(dst)
if err != nil {
return
}
stat, err := os.Stat(src)
if err != nil {