Skip to content

Commit

Permalink
Fix windows filename in Metadata.open.
Browse files Browse the repository at this point in the history
  • Loading branch information
gkellogg committed Oct 9, 2024
1 parent c373e23 commit d0709b4
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions lib/rdf/tabular/metadata.rb
Original file line number Diff line number Diff line change
Expand Up @@ -143,12 +143,11 @@ def self.open(path, **options)
}
)
if RDF::URI(path).relative?
path = File.expand_path(path, __FILE__)
if Gem.win_platform?
path = if Gem.win_platform?
# Expanded path starts with drive letter
"file:/" + File.expand_path(path, __FILE__)
else
path = "file:#{File.expand_path(path, __FILE__)}"
"file:#{File.expand_path(path, __FILE__)}"
end
end
RDF::Util::File.open_file(path, **options) do |file|
Expand Down

0 comments on commit d0709b4

Please sign in to comment.