From 1880a7ad27f653fe47b2c7d2d69daeddc3decd5b Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Sat, 25 Oct 2025 08:26:42 -0500 Subject: wrong perm --- save.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'save.go') diff --git a/save.go b/save.go index ee7aea8..cb29b12 100644 --- a/save.go +++ b/save.go @@ -32,7 +32,7 @@ func SaveWithHeader(pb proto.Message, header string) error { // writes the protobuf to disk (sets Filename if PB has 'Filename') func SaveToFilename(pb proto.Message, fullname string) error { basedir, _ := filepath.Split(fullname) - if err := os.MkdirAll(basedir, os.ModePerm); err != nil { + if err := os.MkdirAll(basedir, 0755); err != nil { return err } if strings.HasSuffix(fullname, ".pb") { @@ -57,7 +57,7 @@ func saveProto(pb proto.Message, fullname string) error { if name == "" { return fmt.Errorf("filename was blank") } - if err := os.MkdirAll(dir, os.ModePerm); err != nil { + if err := os.MkdirAll(dir, 0755); err != nil { return err } @@ -89,7 +89,7 @@ func saveTEXT(pb proto.Message, header string) error { if name == "" { return fmt.Errorf("filename was blank") } - if err := os.MkdirAll(dir, os.ModePerm); err != nil { + if err := os.MkdirAll(dir, 0755); err != nil { return err } @@ -117,7 +117,7 @@ func saveJSON(pb proto.Message) error { if name == "" { return fmt.Errorf("filename was blank") } - if err := os.MkdirAll(dir, os.ModePerm); err != nil { + if err := os.MkdirAll(dir, 0755); err != nil { return err } -- cgit v1.2.3