Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use defined constant for consistency #3522

Merged
merged 1 commit into from
Oct 5, 2021
Merged

Conversation

kenhys
Copy link
Contributor

@kenhys kenhys commented Oct 1, 2021

Which issue(s) this PR fixes:

Fixes #

What this PR does / why we need it:

The default value of dir or file permission is defined in fluent/env.rb.
So it should be used everywhere.

I've found this issue when checking #3521.

Docs Changes:

N/A

Release Note:

N/A

Copy link
Member

@ashie ashie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

storage_local.rb should also use them?

DEFAULT_DIR_MODE = 0755
DEFAULT_FILE_MODE = 0644
config_param :path, :string, default: nil
config_param :mode, default: DEFAULT_FILE_MODE do |v|
v.to_i(8)
end
config_param :dir_mode, default: DEFAULT_DIR_MODE do |v|
v.to_i(8)
end

@kenhys
Copy link
Contributor Author

kenhys commented Oct 5, 2021

It should be, I'll fix it too.

@kenhys
Copy link
Contributor Author

kenhys commented Oct 5, 2021

Fixed.

lib/fluent/plugin/storage_local.rb Outdated Show resolved Hide resolved
@kenhys
Copy link
Contributor Author

kenhys commented Oct 5, 2021

Removed needless constant definition.

@ashie ashie merged commit 1b46fe0 into fluent:master Oct 5, 2021
@kenhys kenhys deleted the use-const branch October 6, 2021 01:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants