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
|
||||
pack_path =
|
||||
Path.join([
|
||||
Pleroma.Config.get!([:instance, :static_dir]),
|
||||
"emoji",
|
||||
path_join_name_safe(
|
||||
Path.join(Pleroma.Config.get!([:instance, :static_dir]), "emoji"),
|
||||
name
|
||||
])
|
||||
)
|
||||
|
||||
with {_, false} <-
|
||||
{"Pack already exists, refusing to import #{name}", File.exists?(pack_path)},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue