mirror of
https://github.com/zeromicro/go-zero.git
synced 2026-05-14 02:10:00 +08:00
(goctl)fix file copy permission missed (#5475)
This commit is contained in:
@@ -64,6 +64,15 @@ func fileCopy(file *zip.File, destPath string) error {
|
||||
return err
|
||||
}
|
||||
defer w.Close()
|
||||
|
||||
_, err = io.Copy(w, rc)
|
||||
return err
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if file.Mode().IsRegular() && file.Mode()&0111 != 0 {
|
||||
return w.Chmod(file.Mode())
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user