Skip to content

Commit

Permalink
Merge pull request #14 from kipcole9/master
Browse files Browse the repository at this point in the history
Use the correct filename resolution
  • Loading branch information
kipcole9 authored Jun 9, 2020
2 parents 8e1b0ae + 9a8d376 commit 17a8d69
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 9 deletions.
7 changes: 0 additions & 7 deletions lib/tz_world.ex
Original file line number Diff line number Diff line change
Expand Up @@ -247,11 +247,4 @@ defmodule TzWorld do
)
end

# Returns the data directory for timezone data
@doc false
def data_dir do
Application.get_env(:tz_world, :data_dir, List.to_string(:code.priv_dir(:tz_world)))
|> String.to_charlist
end

end
5 changes: 3 additions & 2 deletions lib/tz_world/backend/dets.ex
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,10 @@ defmodule TzWorld.Backend.Dets do

@doc false
def filename do
TzWorld.data_dir ++ '/timezones-geodata.dets'
TzWorld.GeoData.data_dir()
|> Path.join("timezones-geodata.dets")
|> String.to_charlist()
end

@doc false
defp dets_options do
[file: filename(), access: :read, estimated_no_objects: @slots]
Expand Down

0 comments on commit 17a8d69

Please sign in to comment.