mirror of
https://git.pleroma.social/pleroma/pleroma.git
synced 2024-12-23 08:36:29 +00:00
Update the pack fallback-src sha generation condition
The old one would not regenerate sha when fallback src changed
This commit is contained in:
parent
9dc9689144
commit
261d92f9c2
1 changed files with 6 additions and 1 deletions
|
@ -229,8 +229,13 @@ keeping it in cache for #{div(cache_ms, 1000)}s")
|
|||
|
||||
full_pack = Jason.decode!(File.read!(pack_file_p))
|
||||
|
||||
# The new fallback-src is in the new data and it's not the same as it was in the old data
|
||||
should_update_fb_sha =
|
||||
not is_nil(new_data["fallback-src"]) and
|
||||
new_data["fallback-src"] != full_pack["pack"]["fallback-src"]
|
||||
|
||||
new_data =
|
||||
if not is_nil(new_data["fallback-src"]) and is_nil(new_data["fallback-src-sha256"]) do
|
||||
if should_update_fb_sha do
|
||||
pack_arch = Tesla.get!(new_data["fallback-src"]).body
|
||||
|
||||
{:ok, flist} = :zip.unzip(pack_arch, [:memory])
|
||||
|
|
Loading…
Reference in a new issue