mirror of
https://github.com/fluent/fluentd-ui.git
synced 2026-05-05 19:06:12 +02:00
Escape argument not to substitute unintended path.
This commit is contained in:
parent
8b22f2d892
commit
974869a6a8
@ -13,7 +13,7 @@ class Fluentd
|
||||
|
||||
def initialize(file_path, note = nil)
|
||||
@file_path = file_path
|
||||
@note = note || Note.create(file_path.sub(/#{FILE_EXTENSION}$/, Note::FILE_EXTENSION))
|
||||
@note = note || Note.create(file_path.sub(/#{Regexp.escape(FILE_EXTENSION)}$/, Note::FILE_EXTENSION))
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user