commit: 16027b769c212095fb6a19d7eaa843a31e91b3ce
parent 36f8b924aea1a0f4cbc63d00224b08e2a2b89a21
Author: Haelwenn <contact+git.pleroma.social@hacktivis.me>
Date: Wed, 27 Nov 2024 14:48:53 +0000
Merge branch 'fix/install-frontend-in-otp27' into 'develop'
Fix installing frontend in Erlang/OTP 27.1+
See merge request pleroma/pleroma!4300
Diffstat:
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/lib/pleroma/frontend.ex b/lib/pleroma/frontend.ex
@@ -74,11 +74,14 @@ defmodule Pleroma.Frontend do
new_file_path = Path.join(dest, path)
- new_file_path
+ path
|> Path.dirname()
+ |> then(&Path.join(dest, &1))
|> File.mkdir_p!()
- File.write!(new_file_path, data)
+ if not File.dir?(new_file_path) do
+ File.write!(new_file_path, data)
+ end
end)
end
end