mirror of
https://github.com/meineerde/rackstash.git
synced 2025-10-17 14:01:01 +00:00
Correctly parse opaque URLs for the File adapter
This commit is contained in:
parent
6831e3db55
commit
8943e18aca
@ -89,13 +89,13 @@ module Rackstash
|
||||
def self.from_uri(uri)
|
||||
uri = URI(uri)
|
||||
|
||||
if (uri.scheme || uri.opaque) == 'file'.freeze
|
||||
if uri.scheme == 'file'.freeze
|
||||
file_options = parse_uri_options(uri)
|
||||
if file_options[:auto_reopen] =~ /\A(:?false|0)?\z/i
|
||||
file_options[:auto_reopen] = false
|
||||
end
|
||||
|
||||
new(uri.path, **file_options)
|
||||
new(uri.path || uri.opaque, **file_options)
|
||||
else
|
||||
raise ArgumentError, "Invalid URI: #{uri}"
|
||||
end
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user