diff --git a/app/models/fluentd/setting_archive/backup_file.rb b/app/models/fluentd/setting_archive/backup_file.rb index b2d2f61..6e53063 100644 --- a/app/models/fluentd/setting_archive/backup_file.rb +++ b/app/models/fluentd/setting_archive/backup_file.rb @@ -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