Ooooh octal... right...

This commit is contained in:
Matthew Holt 2025-01-07 17:14:01 -07:00
parent dd0c3970d3
commit 70beaa4668
No known key found for this signature in database
GPG Key ID: 2A349DD577D586A5

View File

@ -157,7 +157,7 @@ func (fw FileWriter) OpenWriter() (io.WriteCloser, error) {
// create the file if it does not exist; create with the configured mode, or default
// to restrictive if not set. (lumberjack will reuse the file mode across log rotation)
if err := os.MkdirAll(filepath.Dir(fw.Filename), 0700); err != nil {
if err := os.MkdirAll(filepath.Dir(fw.Filename), 0o700); err != nil {
return nil, err
}
file, err := os.OpenFile(fw.Filename, os.O_WRONLY|os.O_APPEND|os.O_CREATE, modeIfCreating)