From 2e859794ee25bdf22216587f8c8260e47b2a038f Mon Sep 17 00:00:00 2001 From: Alexander Strizhakov Date: Sun, 27 Dec 2020 21:58:15 +0300 Subject: [PATCH] non condition dir creation --- .../web/activity_pub/mrf/steal_emoji_policy.ex | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/lib/pleroma/web/activity_pub/mrf/steal_emoji_policy.ex b/lib/pleroma/web/activity_pub/mrf/steal_emoji_policy.ex index 0311ca433..788f21261 100644 --- a/lib/pleroma/web/activity_pub/mrf/steal_emoji_policy.ex +++ b/lib/pleroma/web/activity_pub/mrf/steal_emoji_policy.ex @@ -65,9 +65,7 @@ defmodule Pleroma.Web.ActivityPub.MRF.StealEmojiPolicy do Path.join(Config.get([:instance, :static_dir]), "emoji/stolen") ) - if not Config.get([:mrf_steal_emoji, :dir_exists?], false) do - create_dir(emoji_dir_path) - end + File.mkdir_p(emoji_dir_path) new_emojis = foreign_emojis @@ -98,12 +96,4 @@ defmodule Pleroma.Web.ActivityPub.MRF.StealEmojiPolicy do def describe do {:ok, %{}} 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 -- 2.45.2