Escape argument not to substitute unintended path (fix another again).

This commit is contained in:
hassaku 2015-01-07 17:14:10 +09:00
parent 7f20ba640c
commit fdcb704bec

View File

@ -15,7 +15,7 @@ class Fluentd
end end
def file_id def file_id
@file_id ||= with_file { name.gsub(/#{self.class::FILE_EXTENSION}\Z/,'') } @file_id ||= with_file { name.gsub(/#{Regexp.escape(self.class::FILE_EXTENSION)}\Z/,'') }
end end
def name def name