- if Pleroma.Utils.command_available?("exiftool") do
- System.cmd("exiftool", ["-overwrite_original", "-gps:all=", file], parallelism: true)
- else
- Logger.warn("exiftool is not available, filter #{__MODULE__} skipped")
+ try do
+ case System.cmd("exiftool", ["-overwrite_original", "-gps:all=", file], parallelism: true) do
+ {_response, 0} -> {:ok, :filtered}
+ {error, 1} -> {:error, error}
+ end
+ rescue
+ e in ErlangError ->
+ {:error, "#{__MODULE__}: #{inspect(e)}"}