From: Roman Chvanikov Date: Tue, 28 Jan 2020 14:07:46 +0000 (+0300) Subject: Fix base_url string trimming X-Git-Url: https://git.squeep.com/?a=commitdiff_plain;h=804a702f97e7294feb3d4bdb527a461c40c05d80;p=akkoma Fix base_url string trimming --- diff --git a/lib/pleroma/workers/attachments_cleanup_worker.ex b/lib/pleroma/workers/attachments_cleanup_worker.ex index c6a033e9c..4f7a1a193 100644 --- a/lib/pleroma/workers/attachments_cleanup_worker.ex +++ b/lib/pleroma/workers/attachments_cleanup_worker.ex @@ -75,7 +75,11 @@ defmodule Pleroma.Workers.AttachmentsCleanupWorker do _ -> "" end - base_url = Pleroma.Config.get([Pleroma.Upload, :base_url], Pleroma.Web.base_url()) + base_url = + String.trim_trailing( + Pleroma.Config.get([Pleroma.Upload, :base_url], Pleroma.Web.base_url()), + "/" + ) file_path = String.trim_leading(href, "#{base_url}/#{prefix}")