From bffbaaf3b5892caa96ad875a8c1655564d17ce1c Mon Sep 17 00:00:00 2001 From: Emiliano Ritiro Date: Mon, 13 Mar 2017 20:56:25 -0300 Subject: [PATCH] Remove potentially redundant HEAD request when checking file presence using Fog --- lib/carrierwave/storage/fog.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/carrierwave/storage/fog.rb b/lib/carrierwave/storage/fog.rb index c961874af..e748f401b 100644 --- a/lib/carrierwave/storage/fog.rb +++ b/lib/carrierwave/storage/fog.rb @@ -297,7 +297,7 @@ def size # # [Boolean] true if file exists or false def exists? - !!directory.files.head(path) + !!file end ##