Keep permissions when copying
This commit is contained in:
parent
f043954352
commit
38f5c7f434
|
@ -36,6 +36,7 @@ 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
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue