diff options
author | Haelwenn <contact+git.pleroma.social@hacktivis.me> | 2024-11-27 14:48:53 +0000 |
---|---|---|
committer | Haelwenn <contact+git.pleroma.social@hacktivis.me> | 2024-11-27 14:48:53 +0000 |
commit | 16027b769c212095fb6a19d7eaa843a31e91b3ce (patch) | |
tree | 1b5b21d0c00a3c107de7235a083bb8045e62dc40 /lib | |
parent | 36f8b924aea1a0f4cbc63d00224b08e2a2b89a21 (diff) | |
parent | 3f98c8bd1b86a87e204879da4172178173050638 (diff) | |
download | pleroma-16027b769c212095fb6a19d7eaa843a31e91b3ce.tar.gz pleroma-16027b769c212095fb6a19d7eaa843a31e91b3ce.zip |
Merge branch 'fix/install-frontend-in-otp27' into 'develop'
Fix installing frontend in Erlang/OTP 27.1+
See merge request pleroma/pleroma!4300
Diffstat (limited to 'lib')
-rw-r--r-- | lib/pleroma/frontend.ex | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/pleroma/frontend.ex b/lib/pleroma/frontend.ex index 816499917..a4f427ae5 100644 --- 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 |