Skip to content

Commit 5b7afd9

Browse files
authored
Merge pull request #86 from dvrooman/macOS-directory-permissions
macOS permissions issue for directories
2 parents a48f9aa + aa2dee4 commit 5b7afd9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

file/dirops.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ func NewDirOps(p string) *DirOps {
3434
// CreateDir allows objects to abstract creation of sub directories without knowning the root path of the machine
3535
func (d *DirOps) CreateDir(relpath, suggestion string) (string, error) {
3636
dirname := suggestion
37-
err := os.Mkdir(path.Join(d.base, relpath, suggestion), 0644)
37+
err := os.Mkdir(path.Join(d.base, relpath, suggestion), 0755)
3838
tries := 0
3939
if os.IsExist(err) {
4040
return dirname, nil
@@ -43,7 +43,7 @@ func (d *DirOps) CreateDir(relpath, suggestion string) (string, error) {
4343
log.Printf("error creating %s, trying again\n%v\n", path.Join(d.base, relpath, suggestion), err)
4444
tries++
4545
dirname = fmt.Sprintf("%s_%v", suggestion, tries)
46-
err = os.Mkdir(path.Join(d.base, relpath, dirname), 0644)
46+
err = os.Mkdir(path.Join(d.base, relpath, dirname), 0755)
4747
}
4848
if tries >= 100 {
4949
return "", fmt.Errorf("could not find sutible name for sub directory based on suggestion %s; %v", suggestion, err)

0 commit comments

Comments
 (0)