mirror of
https://akkoma.dev/AkkomaGang/akkoma.git
synced 2024-11-10 10:09:02 +00:00
non condition dir creation
This commit is contained in:
parent
546da68a11
commit
2e859794ee
|
@ -65,9 +65,7 @@ defmodule Pleroma.Web.ActivityPub.MRF.StealEmojiPolicy do
|
||||||
Path.join(Config.get([:instance, :static_dir]), "emoji/stolen")
|
Path.join(Config.get([:instance, :static_dir]), "emoji/stolen")
|
||||||
)
|
)
|
||||||
|
|
||||||
if not Config.get([:mrf_steal_emoji, :dir_exists?], false) do
|
File.mkdir_p(emoji_dir_path)
|
||||||
create_dir(emoji_dir_path)
|
|
||||||
end
|
|
||||||
|
|
||||||
new_emojis =
|
new_emojis =
|
||||||
foreign_emojis
|
foreign_emojis
|
||||||
|
@ -98,12 +96,4 @@ defmodule Pleroma.Web.ActivityPub.MRF.StealEmojiPolicy do
|
||||||
def describe do
|
def describe do
|
||||||
{:ok, %{}}
|
{:ok, %{}}
|
||||||
end
|
end
|
||||||
|
|
||||||
defp create_dir(path) do
|
|
||||||
if not File.exists?(path) do
|
|
||||||
File.mkdir_p!(path)
|
|
||||||
end
|
|
||||||
|
|
||||||
Config.put([:mrf_steal_emoji, :dir_exists?], true)
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue