@@ -22,7 +22,7 @@ import (
2222func CheckExistAndCreate (dir string ) {
2323 _ , err := os .Stat (dir )
2424 if err != nil {
25- os .MkdirAll (dir , 0700 )
25+ os .MkdirAll (dir , 0770 )
2626 }
2727}
2828
@@ -52,20 +52,20 @@ func Unzip(src, dest string) error {
5252
5353 fpath := filepath .Join (dest , f .Name )
5454 if f .FileInfo ().IsDir () {
55- os .MkdirAll (fpath , 0700 )
55+ os .MkdirAll (fpath , 0770 )
5656 } else {
5757 var fdir string
5858 if lastIndex := strings .LastIndex (fpath , string (os .PathSeparator )); lastIndex > - 1 {
5959 fdir = fpath [:lastIndex ]
6060 }
6161
62- err = os .MkdirAll (fdir , 0700 )
62+ err = os .MkdirAll (fdir , 0770 )
6363 if err != nil {
6464 log .Fatal (err )
6565 return err
6666 }
6767 f , err := os .OpenFile (
68- fpath , os .O_WRONLY | os .O_CREATE | os .O_TRUNC , 0700 )
68+ fpath , os .O_WRONLY | os .O_CREATE | os .O_TRUNC , 0770 )
6969 if err != nil {
7070 return err
7171 }
@@ -87,15 +87,15 @@ func Copy(src, dest string, recursive bool, filters []string) error {
8787 return err
8888 }
8989
90- os .MkdirAll (dest , 0700 )
90+ os .MkdirAll (dest , 0770 )
9191
9292 for _ , file := range dir {
9393 fileName := file .Name ()
9494 fSrcPath := filepath .Join (src , fileName )
9595
9696 fDestPath := filepath .Join (dest , fileName )
9797 if file .IsDir () && recursive {
98- os .MkdirAll (fDestPath , 0700 )
98+ os .MkdirAll (fDestPath , 0770 )
9999 if err = Copy (fSrcPath , fDestPath , true , filters ); err != nil {
100100 return err
101101 }
@@ -122,7 +122,7 @@ func Copy(src, dest string, recursive bool, filters []string) error {
122122 defer fSrc .Close ()
123123
124124 fDest , err := os .OpenFile (
125- fDestPath , os .O_WRONLY | os .O_CREATE | os .O_TRUNC , 0700 )
125+ fDestPath , os .O_WRONLY | os .O_CREATE | os .O_TRUNC , 0770 )
126126 if err != nil {
127127 return err
128128 }
@@ -148,7 +148,7 @@ func CopyFile(srcPath, dest string) error {
148148 CheckExistAndCreate (dest )
149149 destPath := filepath .Join (dest , filepath .Base (srcPath ))
150150 fDest , err := os .OpenFile (
151- destPath , os .O_WRONLY | os .O_CREATE | os .O_TRUNC , 0700 )
151+ destPath , os .O_WRONLY | os .O_CREATE | os .O_TRUNC , 0770 )
152152 if err != nil {
153153 return err
154154 }
@@ -220,7 +220,7 @@ func ModifyFile(path string, repl func(string) string) {
220220
221221 content := repl (string (raw ))
222222
223- os .WriteFile (path , []byte (content ), 0700 )
223+ os .WriteFile (path , []byte (content ), 0770 )
224224}
225225
226226// GetSpotifyVersion .
0 commit comments