Use Application.app_dir/2 instead of :code.priv_dir
This commit is contained in:
@@ -1,8 +1,7 @@
|
|||||||
defmodule MusicLibrary.Records.Cover do
|
defmodule MusicLibrary.Records.Cover do
|
||||||
@size 600
|
@size 600
|
||||||
|
|
||||||
@fallback_path :code.priv_dir(:music_library)
|
@fallback_path Application.app_dir(:music_library, ["priv", "cover-not-found.jpg"])
|
||||||
|> Path.join("/cover-not-found.jpg")
|
|
||||||
|
|
||||||
@external_resource @fallback_path
|
@external_resource @fallback_path
|
||||||
|
|
||||||
|
|||||||
@@ -25,8 +25,8 @@ defmodule MusicLibrary.Repo do
|
|||||||
:linux -> "so"
|
:linux -> "so"
|
||||||
end
|
end
|
||||||
|
|
||||||
Path.join([
|
Application.app_dir(:music_library, [
|
||||||
:code.priv_dir(:music_library),
|
"priv",
|
||||||
"sqlite_extensions",
|
"sqlite_extensions",
|
||||||
platform,
|
platform,
|
||||||
"#{name}.#{extension}"
|
"#{name}.#{extension}"
|
||||||
|
|||||||
Reference in New Issue
Block a user