X-Git-Url: http://git.squeep.com/?a=blobdiff_plain;ds=sidebyside;f=lib%2Fpleroma%2Fworkers%2Fattachments_cleanup_worker.ex;h=3c5820a866ab93fc83cc5abd0d39d53199cd2564;hb=2b7d7bbd2dc3121488592a958c29ba6a418e0104;hp=a738df90aac25bf64286f9b78724a962edcbcaa6;hpb=eb4870e1cdc0b7f02c071b88a62cb76401393c0b;p=akkoma
diff --git a/lib/pleroma/workers/attachments_cleanup_worker.ex b/lib/pleroma/workers/attachments_cleanup_worker.ex
index a738df90a..3c5820a86 100644
--- a/lib/pleroma/workers/attachments_cleanup_worker.ex
+++ b/lib/pleroma/workers/attachments_cleanup_worker.ex
@@ -1,5 +1,5 @@
# Pleroma: A lightweight social networking server
-# Copyright © 2017-2019 Pleroma Authors
+# Copyright © 2017-2020 Pleroma Authors
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Pleroma.Workers.AttachmentsCleanupWorker do
@@ -73,7 +73,11 @@ defmodule Pleroma.Workers.AttachmentsCleanupWorker do
_ -> ""
end
- base_url = Pleroma.Config.get([__MODULE__, :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}")