Update package.go

This commit is contained in:
ScottWinkler 2018-03-29 14:18:09 -07:00 committed by GitHub
parent 38f5c7f434
commit 05143987ae
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -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
}