Fix priv/static/instance/static to be just instance/static
It was a misunderstanding
This commit is contained in:
parent
31cff7dbca
commit
53a3e61016
@ -137,11 +137,8 @@ defmodule Mix.Tasks.Pleroma.Emoji do
|
|||||||
|
|
||||||
IO.puts(IO.ANSI.format(["Unpacking ", :bright, pack_name]))
|
IO.puts(IO.ANSI.format(["Unpacking ", :bright, pack_name]))
|
||||||
|
|
||||||
static_path = Path.join(:code.priv_dir(:pleroma), "static")
|
|
||||||
|
|
||||||
pack_path =
|
pack_path =
|
||||||
Path.join([
|
Path.join([
|
||||||
static_path,
|
|
||||||
Pleroma.Config.get!([:instance, :static_dir]),
|
Pleroma.Config.get!([:instance, :static_dir]),
|
||||||
"emoji",
|
"emoji",
|
||||||
pack_name
|
pack_name
|
||||||
@ -161,19 +158,12 @@ defmodule Mix.Tasks.Pleroma.Emoji do
|
|||||||
|
|
||||||
IO.puts(IO.ANSI.format(["Writing emoji.txt for ", :bright, pack_name]))
|
IO.puts(IO.ANSI.format(["Writing emoji.txt for ", :bright, pack_name]))
|
||||||
|
|
||||||
common_pack_path =
|
|
||||||
Path.join([
|
|
||||||
"/",
|
|
||||||
Pleroma.Config.get!([:instance, :static_dir]),
|
|
||||||
"emoji",
|
|
||||||
pack_name
|
|
||||||
])
|
|
||||||
|
|
||||||
emoji_txt_str =
|
emoji_txt_str =
|
||||||
Enum.map(
|
Enum.map(
|
||||||
files,
|
files,
|
||||||
fn {shortcode, path} ->
|
fn {shortcode, path} ->
|
||||||
"#{shortcode}, #{Path.join(common_pack_path, path)}"
|
emojo_path = Path.join("/emoji/#{pack_name}", path)
|
||||||
|
"#{shortcode}, #{emojo_path}"
|
||||||
end
|
end
|
||||||
)
|
)
|
||||||
|> Enum.join("\n")
|
|> Enum.join("\n")
|
||||||
|
@ -81,14 +81,11 @@ defmodule Pleroma.Emoji do
|
|||||||
end
|
end
|
||||||
|
|
||||||
defp load do
|
defp load do
|
||||||
static_path = Path.join(:code.priv_dir(:pleroma), "static")
|
|
||||||
|
|
||||||
emoji_dir_path =
|
emoji_dir_path =
|
||||||
Path.join([
|
Path.join(
|
||||||
static_path,
|
|
||||||
Pleroma.Config.get!([:instance, :static_dir]),
|
Pleroma.Config.get!([:instance, :static_dir]),
|
||||||
"emoji"
|
"emoji"
|
||||||
])
|
)
|
||||||
|
|
||||||
case File.ls(emoji_dir_path) do
|
case File.ls(emoji_dir_path) do
|
||||||
{:error, :enoent} ->
|
{:error, :enoent} ->
|
||||||
@ -135,20 +132,12 @@ defmodule Pleroma.Emoji do
|
|||||||
"No emoji.txt found for pack \"#{pack_name}\", assuming all .png files are emoji"
|
"No emoji.txt found for pack \"#{pack_name}\", assuming all .png files are emoji"
|
||||||
)
|
)
|
||||||
|
|
||||||
common_pack_path =
|
make_shortcode_to_file_map(pack_dir, [".png"]) |>
|
||||||
Path.join([
|
Enum.map(fn {shortcode, rel_file} ->
|
||||||
"/",
|
filename = Path.join("/emoji/#{pack_name}", rel_file)
|
||||||
Pleroma.Config.get!([:instance, :static_dir]),
|
|
||||||
"emoji",
|
|
||||||
pack_name
|
|
||||||
])
|
|
||||||
|
|
||||||
make_shortcode_to_file_map(pack_dir, [".png"])
|
{shortcode, filename, [to_string(match_extra(@groups, filename))]}
|
||||||
|> Enum.map(fn {shortcode, rel_file} ->
|
end)
|
||||||
filename = Path.join(common_pack_path, rel_file)
|
|
||||||
|
|
||||||
{shortcode, filename, [to_string(match_extra(@groups, filename))]}
|
|
||||||
end)
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user