Skip to content

Commit

Permalink
File Permission fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
Dodi Triwibowo committed Jun 25, 2020
1 parent ec2f560 commit e9b2ec3
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions file.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ func (f *File) Store(path string, pattern string, perm os.FileMode) (string, err
return "", errors.New("failed to read file")
}
file.Write(fBytes)

os.Chmod(file.Name(), perm)
f.name = file.Name()
//here we save our file to our path
return filepath.Base(f.name), nil
Expand Down

0 comments on commit e9b2ec3

Please sign in to comment.