projects
/
akkoma
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Refactoring of :if_func / :unless_func plug options (general availability). Added...
[akkoma]
/
lib
/
pleroma
/
workers
/
attachments_cleanup_worker.ex
diff --git
a/lib/pleroma/workers/attachments_cleanup_worker.ex
b/lib/pleroma/workers/attachments_cleanup_worker.ex
index a738df90aac25bf64286f9b78724a962edcbcaa6..3c5820a866ab93fc83cc5abd0d39d53199cd2564 100644
(file)
--- 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
# Pleroma: A lightweight social networking server
-# Copyright © 2017-20
19
Pleroma Authors <https://pleroma.social/>
+# Copyright © 2017-20
20
Pleroma Authors <https://pleroma.social/>
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Pleroma.Workers.AttachmentsCleanupWorker do
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Pleroma.Workers.AttachmentsCleanupWorker do
@@
-73,7
+73,11
@@
defmodule Pleroma.Workers.AttachmentsCleanupWorker do
_ -> ""
end
_ -> ""
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}")
file_path = String.trim_leading(href, "#{base_url}/#{prefix}")