Merge branch 'develop' of git.pleroma.social:pleroma/pleroma into seanking/pleroma...
authorlain <lain@soykaf.club>
Thu, 3 Sep 2020 09:29:39 +0000 (11:29 +0200)
committerlain <lain@soykaf.club>
Thu, 3 Sep 2020 09:29:39 +0000 (11:29 +0200)
lib/mix/tasks/pleroma/frontend.ex

index 484af6da70bd3d77ba6aa3c91b0499e6490aa3d4..1957b1d84c42a7faf4ae7b03bf32e39d298345a1 100644 (file)
@@ -69,7 +69,7 @@ defmodule Mix.Tasks.Pleroma.Frontend do
 
     fe_label = "#{frontend} (#{ref})"
 
-    tmp_dir = Path.join(dest, "tmp")
+    tmp_dir = Path.join([instance_static_dir, "frontends", "tmp"])
 
     with {_, :ok} <-
            {:download_or_unzip, download_or_unzip(frontend_info, tmp_dir, options[:file])},
@@ -135,6 +135,7 @@ defmodule Mix.Tasks.Pleroma.Frontend do
 
   defp install_frontend(frontend_info, source, dest) do
     from = frontend_info["build_dir"] || "dist"
+    File.rm_rf!(dest)
     File.mkdir_p!(dest)
     File.cp_r!(Path.join([source, from]), dest)
     :ok