diff --git a/lib/tz_world.ex b/lib/tz_world.ex index ca83220..bc80b2b 100644 --- a/lib/tz_world.ex +++ b/lib/tz_world.ex @@ -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 diff --git a/lib/tz_world/backend/dets.ex b/lib/tz_world/backend/dets.ex index 4002103..fa80de9 100644 --- a/lib/tz_world/backend/dets.ex +++ b/lib/tz_world/backend/dets.ex @@ -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]