mirror of
https://github.com/opentofu/opentofu.git
synced 2025-02-10 23:55:34 -06:00
Update package.go
This commit is contained in:
parent
38f5c7f434
commit
05143987ae
@ -36,7 +36,6 @@ func CopyFile(src, dst string) (err error) {
|
||||
}
|
||||
dfi, err := os.Stat(dst)
|
||||
if err != nil {
|
||||
os.Chmod(dst, sfi.Mode())
|
||||
if !os.IsNotExist(err) {
|
||||
return
|
||||
}
|
||||
@ -52,6 +51,7 @@ func CopyFile(src, dst string) (err error) {
|
||||
return
|
||||
}
|
||||
err = copyFileContents(src, dst)
|
||||
os.Chmod(dst, sfi.Mode())
|
||||
return
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user