lib/fluent/plugin/buf_file.rb in fluentd-0.10.7 vs lib/fluent/plugin/buf_file.rb in fluentd-0.10.8
- old
+ new
@@ -155,14 +155,14 @@
chunk.mv(npath)
end
protected
def encode_key(key)
- URI.encode(key, /[^-_.a-zA-Z0-9]/n)
+ URI.escape(key, /[^-_.a-zA-Z0-9]/n)
end
def decode_key(encoded_key)
- URI.decode(encoded_key, /[^-_.a-zA-Z0-9]/n)
+ URI.unescape(encoded_key)
end
def make_path(encoded_key, bq)
now = Time.now.utc
tsuffix = ((now.to_i*1000*1000+now.usec) << 12 | rand(0xfff)).to_s(16)