Skip to content

Commit c67b948

Browse files
committed
Just use path if there's a file scheme. This leaves out a potential host, which isn't supported anyway.
1 parent 47fdb73 commit c67b948

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/rdf/util/file.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -320,9 +320,9 @@ def self.open_file(filename_or_url, proxy: nil, headers: {}, verify_none: false,
320320
url_no_frag_or_query.fragment = nil
321321
options[:encoding] ||= Encoding::UTF_8
322322

323-
# Normalize a file scheme further
323+
# Just use path if there's a file scheme. This leaves out a potential host, which isn't supported anyway.
324324
if url_no_frag_or_query.scheme == 'file'
325-
url_no_frag_or_query = "file:///#{url_no_frag_or_query.path}"
325+
url_no_frag_or_query = url_no_frag_or_query.path
326326
end
327327

328328
Kernel.open(url_no_frag_or_query, "r", **options) do |file|

0 commit comments

Comments
 (0)