From 6e7366acd588060fb1a302179022feec93becec3 Mon Sep 17 00:00:00 2001 From: huof6890 <68298506@qq.com> Date: Wed, 20 Jul 2022 18:28:37 +0800 Subject: [PATCH] fix dir permission and file inclusion --- ioctl/cmd/contract/contractshare.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ioctl/cmd/contract/contractshare.go b/ioctl/cmd/contract/contractshare.go index f47de65a49..cb89582290 100644 --- a/ioctl/cmd/contract/contractshare.go +++ b/ioctl/cmd/contract/contractshare.go @@ -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 @@ -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 }