fix compile warnings
This commit is contained in:
parent
cf85a9aea1
commit
074fa790ba
53 changed files with 203 additions and 259 deletions
|
|
@ -1,18 +1,16 @@
|
|||
defmodule Mix.Tasks.Pleroma.Uploads do
|
||||
use Mix.Task
|
||||
import Mix.Ecto
|
||||
alias Pleroma.{Upload, Uploaders.Local, Uploaders.S3}
|
||||
alias Pleroma.{Upload, Uploaders.Local}
|
||||
alias Mix.Tasks.Pleroma.Common
|
||||
require Logger
|
||||
|
||||
@log_every 50
|
||||
@shortdoc "Migrate uploads from local to remote storage"
|
||||
@longdoc """
|
||||
@doc """
|
||||
Manages uploads
|
||||
## Migrate uploads from local to remote storage
|
||||
|
||||
"""
|
||||
|
||||
def run(["migrate_local", target_uploader | args]) do
|
||||
delete? = Enum.member?(args, "--delete")
|
||||
Common.start_pleroma()
|
||||
|
|
@ -59,7 +57,7 @@ defmodule Mix.Tasks.Pleroma.Uploads do
|
|||
|
||||
File.exists?(root_path) ->
|
||||
file = Path.basename(id)
|
||||
[hash, ext] = String.split(id, ".")
|
||||
[hash, _ext] = String.split(id, ".")
|
||||
{%Pleroma.Upload{id: hash, name: file, path: file, tempfile: root_path}, root_path}
|
||||
|
||||
true ->
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue