mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
os: change the type of permissions argument for Open etc. to uint32.
Besides being more correct, it protects against people accidentally exchanging the permission and open mode arguments to Open. R=rsc CC=golang-dev https://golang.org/cl/1904045
This commit is contained in:
parent
1badb46313
commit
e45b58fe96
21 changed files with 128 additions and 128 deletions
|
|
@ -153,7 +153,7 @@ func main() {
|
|||
changed[o.Dst] = 1
|
||||
}
|
||||
if o.Mode != 0 {
|
||||
chk(os.Chmod(o.Dst, o.Mode&0755))
|
||||
chk(os.Chmod(o.Dst, uint32(o.Mode&0755)))
|
||||
undoRevert(o.Dst)
|
||||
changed[o.Dst] = 1
|
||||
}
|
||||
|
|
@ -192,7 +192,7 @@ func makeParent(name string) {
|
|||
|
||||
// Copy of os.MkdirAll but adds to undo log after
|
||||
// creating a directory.
|
||||
func mkdirAll(path string, perm int) os.Error {
|
||||
func mkdirAll(path string, perm uint32) os.Error {
|
||||
dir, err := os.Lstat(path)
|
||||
if err == nil {
|
||||
if dir.IsDirectory() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue