You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I started to use go mod. And import this package: https://github.com/kentaro/go-hoedown
But go get creates broken package files on $GOPATH/mod/github.com/kentaro/go-hoedown@v0.0.0-20181022120212-3beb09ec8bbe.
Because this repository uses symbolic links to import external package's c files and compile it with cgo, but cmd/go/internal/modfetch/unzip ignores file mode.
What did you expect to see?
I think keep file type using zip file (extra) header. I tried following patch:
diff --git a/src/cmd/go/internal/modfetch/unzip.go b/src/cmd/go/internal/modfetch/unzip.go
index a50431fd86..765b68d9f5 100644
--- a/src/cmd/go/internal/modfetch/unzip.go+++ b/src/cmd/go/internal/modfetch/unzip.go@@ -113,7 +113,7 @@ func Unzip(dir, zipfile, prefix string, maxSize int64) error {
if err := os.MkdirAll(filepath.Dir(dst), 0777); err != nil {
return err
}
- w, err := os.OpenFile(dst, os.O_WRONLY|os.O_CREATE|os.O_TRUNC, 0444)+ w, err := os.OpenFile(dst, os.O_WRONLY|os.O_CREATE|os.O_TRUNC, zf.Mode()&7444) // keep file type and makes read only file
if err != nil {
return fmt.Errorf("unzip %v: %v", zipfile, err)
}
But, it's not works. (maybe, is it archive/zip's bug?)
What did you see instead?
nop 😢
The text was updated successfully, but these errors were encountered:
What version of Go are you using (
go version
)?go version go1.11.1 darwin/amd64
Does this issue reproduce with the latest release?
yes
What operating system and processor architecture are you using (
go env
)?What did you do?
I started to use
go mod
. And import this package: https://github.com/kentaro/go-hoedownBut
go get
creates broken package files on$GOPATH/mod/github.com/kentaro/go-hoedown@v0.0.0-20181022120212-3beb09ec8bbe
.Because this repository uses symbolic links to import external package's c files and compile it with cgo, but
cmd/go/internal/modfetch/unzip
ignores file mode.What did you expect to see?
I think keep file type using zip file (extra) header. I tried following patch:
But, it's not works. (maybe, is it
archive/zip
's bug?)What did you see instead?
nop 😢
The text was updated successfully, but these errors were encountered: