Skip to content

Commit

Permalink
fix dir permission and file inclusion
Browse files Browse the repository at this point in the history
  • Loading branch information
huof6829 committed Jul 20, 2022
1 parent cc09a6c commit 6e7366a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ioctl/cmd/contract/contractshare.go
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ func share(args []string) error {
break
}
getPayloadPath = filepath.Join(_givenPath, getPayloadPath)
upload, err := os.ReadFile(getPayloadPath)
upload, err := os.ReadFile(filepath.Clean(getPayloadPath))
if err != nil {
log.Println("read file failed: ", err)
break
Expand Down Expand Up @@ -251,7 +251,7 @@ func share(args []string) error {
break
}
setPath = filepath.Join(_givenPath, setPath)
if err := os.MkdirAll(filepath.Dir(setPath), 0755); err != nil {
if err := os.MkdirAll(filepath.Dir(setPath), 0750); err != nil {
log.Println("mkdir failed: ", err)
break
}
Expand Down

0 comments on commit 6e7366a

Please sign in to comment.