From e5549cf8edf66b6cf52197e32f805103b2aa32c0 Mon Sep 17 00:00:00 2001 From: "byte[]" Date: Fri, 3 Jan 2020 11:54:05 -0500 Subject: [PATCH] remove .bak file created by optipng bug https://sourceforge.net/p/optipng/bugs/74/ --- lib/philomena/processors/png.ex | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/philomena/processors/png.ex b/lib/philomena/processors/png.ex index f970c726..5b919a83 100644 --- a/lib/philomena/processors/png.ex +++ b/lib/philomena/processors/png.ex @@ -29,7 +29,10 @@ defmodule Philomena.Processors.Png do {_output, 0} = System.cmd("optipng", ["-fix", "-i0", "-o2", "-quiet", "-clobber", file, "-out", optimized]) - + + # Remove useless .bak file + File.rm(optimized <> ".bak") + optimized end