Skip to content

Commit

Permalink
[FAB-2865] Set the chaincode file mode bits
Browse files Browse the repository at this point in the history
We should force the mode bits, rather than accepting what the
filesystem just happened to present.

Fixes FAB-2865

Change-Id: I02618026927607cc78fd5545e05880bf01bea5af
Signed-off-by: Gregory Haskins <gregory.haskins@gmail.com>
  • Loading branch information
ghaskins committed Apr 4, 2017
1 parent aa119ec commit cacb292
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions core/container/util/writer.go
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,7 @@ func WriteStreamToPackage(is io.Reader, localpath string, packagepath string, tw
header.ModTime = zeroTime
header.ChangeTime = zeroTime
header.Name = packagepath
header.Mode = 0100644

if err = tw.WriteHeader(header); err != nil {
return fmt.Errorf("Error write header for (path: %s, oldname:%s,newname:%s,sz:%d) : %s", localpath, oldname, packagepath, header.Size, err)
Expand Down

0 comments on commit cacb292

Please sign in to comment.