lib/carrierwave/sanitized_file.rb in carrierwave-2.2.1 vs lib/carrierwave/sanitized_file.rb in carrierwave-2.2.2

- old
+ new

@@ -333,10 +333,10 @@ type = File.open(path) do |file| Marcel::Magic.by_magic(file).try(:type) end if type.nil? - type = Marcel::Magic.by_path(file).try(:type) + type = Marcel::Magic.by_path(path).try(:type) type = 'invalid/invalid' unless type.nil? || type.start_with?('text/') end type end