Skip to content

Commit

Permalink
feat: have default permission as const
Browse files Browse the repository at this point in the history
Signed-off-by: Smuu <[email protected]>
  • Loading branch information
smuu committed Dec 6, 2024
1 parent 3137e58 commit 34a7443
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pkg/instance/storage.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ type storage struct {
files []*k8s.File
}

const defaultFilePermission = 0644

func (i *Instance) Storage() *storage {
return i.storage
}
Expand Down Expand Up @@ -142,7 +144,7 @@ func (s *storage) AddFileBytes(bytes []byte, dest string, chown string) error {
if _, err := tmpfile.Write(bytes); err != nil {
return err
}
if err := tmpfile.Chmod(0644); err != nil {
if err := tmpfile.Chmod(defaultFilePermission); err != nil {
return err
}
if err := tmpfile.Close(); err != nil {
Expand Down

0 comments on commit 34a7443

Please sign in to comment.