Use path_join_name_safe for pathname joining
This commit is contained in:
parent
321bd75dca
commit
26ac875bc8
1 changed files with 3 additions and 4 deletions
|
|
@ -227,11 +227,10 @@ defmodule Pleroma.Emoji.Pack do
|
||||||
|
|
||||||
def download_zip(name, opts \\ %{}) do
|
def download_zip(name, opts \\ %{}) do
|
||||||
pack_path =
|
pack_path =
|
||||||
Path.join([
|
path_join_name_safe(
|
||||||
Pleroma.Config.get!([:instance, :static_dir]),
|
Path.join(Pleroma.Config.get!([:instance, :static_dir]), "emoji"),
|
||||||
"emoji",
|
|
||||||
name
|
name
|
||||||
])
|
)
|
||||||
|
|
||||||
with {_, false} <-
|
with {_, false} <-
|
||||||
{"Pack already exists, refusing to import #{name}", File.exists?(pack_path)},
|
{"Pack already exists, refusing to import #{name}", File.exists?(pack_path)},
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue