From 804a702f97e7294feb3d4bdb527a461c40c05d80 Mon Sep 17 00:00:00 2001 From: Roman Chvanikov Date: Tue, 28 Jan 2020 17:07:46 +0300 Subject: [PATCH] Fix base_url string trimming --- lib/pleroma/workers/attachments_cleanup_worker.ex | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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}") -- 2.45.2