Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
G
golang
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
go
golang
Commits
ba419785
Commit
ba419785
authored
Jan 29, 2013
by
Francesc Campoy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
go/misc/dist: Keep file modes when copying.
R=adg CC=golang-dev
https://golang.org/cl/7221055
parent
3bf3ba2d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
0 deletions
+7
-0
bindist.go
misc/dist/bindist.go
+7
-0
No files found.
misc/dist/bindist.go
View file @
ba419785
...
...
@@ -611,11 +611,18 @@ func cp(dst, src string) error {
return
err
}
defer
sf
.
Close
()
fi
,
err
:=
sf
.
Stat
()
if
err
!=
nil
{
return
err
}
df
,
err
:=
os
.
Create
(
dst
)
if
err
!=
nil
{
return
err
}
defer
df
.
Close
()
if
err
:=
df
.
Chmod
(
fi
.
Mode
());
err
!=
nil
{
return
err
}
_
,
err
=
io
.
Copy
(
df
,
sf
)
return
err
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment