no virus scan check for travis

This commit is contained in:
Kyle Drake 2014-08-10 18:53:46 -07:00
parent cc64a57172
commit d4ed6a30c2

View file

@ -270,6 +270,9 @@ class Site < Sequel::Model
return false unless (Site::VALID_MIME_TYPES.include?(mime_type) || mime_type =~ /text/) &&
Site::VALID_EXTENSIONS.include?(File.extname(uploaded_file[:filename]).sub(/^./, '').downcase)
# clamdscan doesn't work on travis for testing
return true if ENV['TRAVIS'] == 'true'
File.chmod 0640, uploaded_file[:tempfile].path
line = Cocaine::CommandLine.new(
"clamdscan", "-i --remove=no --no-summary --stdout :path",