Skip to content

Commit

Permalink
fix: remove hard coded file permissions
Browse files Browse the repository at this point in the history
  • Loading branch information
ookkoouu committed Mar 29, 2024
1 parent e964367 commit f4fe77b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions core/installer.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,11 @@ func (i *LocalInstaller) saveCache(name string, v any) error {
if err != nil {
return err
}
err = os.MkdirAll(filepath.Dir(p), 0744)
err = os.MkdirAll(filepath.Dir(p), os.ModePerm)
if err != nil {
return err
}
return os.WriteFile(p, data, 0644)
return os.WriteFile(p, data, os.ModePerm)
}

func (i *LocalInstaller) restoreCache(name string, v any) error {
Expand Down Expand Up @@ -180,11 +180,11 @@ func (i *LocalInstaller) InstallMod(ctx context.Context, m *Mod) error {
}

p := filepath.Join(i.BaseDir, m.Path)
err = os.MkdirAll(filepath.Dir(p), 0744)
err = os.MkdirAll(filepath.Dir(p), os.ModePerm)
if err != nil {
return err
}
return os.WriteFile(p, data, 0644)
return os.WriteFile(p, data, os.ModePerm)
}

// Install execute install and update modpack
Expand Down

0 comments on commit f4fe77b

Please sign in to comment.